Class: Giftrocket::User

Inherits:
Object
  • Object
show all
Defined in:
lib/giftrocket/user.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ User

Returns a new instance of User.



6
7
8
9
10
# File 'lib/giftrocket/user.rb', line 6

def initialize(attributes)
  attributes = attributes.with_indifferent_access
  self.name = attributes[:name]
  self.email = attributes[:email]
end

Instance Attribute Details

#emailObject

Returns the value of attribute email.



4
5
6
# File 'lib/giftrocket/user.rb', line 4

def email
  @email
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/giftrocket/user.rb', line 4

def name
  @name
end