user.rb 343 Bytes
Newer Older
Robert Speicher's avatar
Robert Speicher committed
1
2
3
4
5
6
7
8
9
10
11
12
class User
  include FullNameSplitter

  attr_accessor :first_name, :last_name, :email

  def initialize(params)
    self.full_name = params['name']
    self.email     = params['email']
  end

  def to_param
    {
13
14
15
16
      email:      email,
      firstName:  first_name,
      lastName:   last_name,
      signUpDate: Date.today
Robert Speicher's avatar
Robert Speicher committed
17
18
19
    }
  end
end