Class: Giftrocket::User
- Inherits:
-
Object
- Object
- Giftrocket::User
- Defined in:
- lib/giftrocket/user.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ User
constructor
A new instance of User.
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
#email ⇒ Object
Returns the value of attribute email.
4 5 6 |
# File 'lib/giftrocket/user.rb', line 4 def email @email end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/giftrocket/user.rb', line 4 def name @name end |