Method: CTM::User#initialize
- Defined in:
- lib/ctm/user.rb
#initialize(data, token = nil) ⇒ User
Returns a new instance of User.
10 11 12 13 14 15 16 17 |
# File 'lib/ctm/user.rb', line 10 def initialize(data, token=nil) super(data, token) @id = data['id'] @first_name = data['first_name'] @last_name = data['last_name'] @email = data['email'] @role = data['role'] end |