Class: FroyoApi::Name
Instance Attribute Summary collapse
-
#firstname ⇒ Object
readonly
Returns the value of attribute firstname.
-
#fullname ⇒ Object
readonly
Returns the value of attribute fullname.
-
#gender ⇒ Object
readonly
Returns the value of attribute gender.
-
#lastname ⇒ Object
readonly
Returns the value of attribute lastname.
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(gender = 'm') ⇒ Name
constructor
A new instance of Name.
Methods inherited from Client
Constructor Details
#initialize(gender = 'm') ⇒ Name
Returns a new instance of Name.
5 6 7 8 9 10 |
# File 'lib/froyo_api/name.rb', line 5 def initialize(gender = 'm') @gender = gender @fullname = attributes['fullname'] @firstname = attributes['firstname'] @lastname = attributes['lastname'] end |
Instance Attribute Details
#firstname ⇒ Object (readonly)
Returns the value of attribute firstname.
3 4 5 |
# File 'lib/froyo_api/name.rb', line 3 def firstname @firstname end |
#fullname ⇒ Object (readonly)
Returns the value of attribute fullname.
3 4 5 |
# File 'lib/froyo_api/name.rb', line 3 def fullname @fullname end |
#gender ⇒ Object (readonly)
Returns the value of attribute gender.
3 4 5 |
# File 'lib/froyo_api/name.rb', line 3 def gender @gender end |
#lastname ⇒ Object (readonly)
Returns the value of attribute lastname.
3 4 5 |
# File 'lib/froyo_api/name.rb', line 3 def lastname @lastname end |
Instance Method Details
#attributes ⇒ Object
12 13 14 |
# File 'lib/froyo_api/name.rb', line 12 def attributes @attributes ||= generate end |