Class: Kiva::Borrower
- Inherits:
-
Object
- Object
- Kiva::Borrower
- Includes:
- DynamicInitializer
- Defined in:
- lib/ruby-kiva/borrower.rb
Instance Attribute Summary collapse
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#gender ⇒ Object
Returns the value of attribute gender.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#pictured ⇒ Object
Returns the value of attribute pictured.
Instance Method Summary collapse
Methods included from DynamicInitializer
Instance Attribute Details
#first_name ⇒ Object
Returns the value of attribute first_name.
4 5 6 |
# File 'lib/ruby-kiva/borrower.rb', line 4 def first_name @first_name end |
#gender ⇒ Object
Returns the value of attribute gender.
4 5 6 |
# File 'lib/ruby-kiva/borrower.rb', line 4 def gender @gender end |
#last_name ⇒ Object
Returns the value of attribute last_name.
4 5 6 |
# File 'lib/ruby-kiva/borrower.rb', line 4 def last_name @last_name end |
#pictured ⇒ Object
Returns the value of attribute pictured.
4 5 6 |
# File 'lib/ruby-kiva/borrower.rb', line 4 def pictured @pictured end |
Instance Method Details
#female? ⇒ Boolean
9 10 11 |
# File 'lib/ruby-kiva/borrower.rb', line 9 def female? self.gender == 'F' end |
#male? ⇒ Boolean
6 7 8 |
# File 'lib/ruby-kiva/borrower.rb', line 6 def male? self.gender == 'M' end |
#pictured? ⇒ Boolean
13 14 15 |
# File 'lib/ruby-kiva/borrower.rb', line 13 def pictured? self.pictured end |
#to_s ⇒ Object
17 18 19 |
# File 'lib/ruby-kiva/borrower.rb', line 17 def to_s "<#{self.first_name} #{self.last_name} #{self.gender} #{self.pictured?}>" end |