Class: Kiva::Borrower

Inherits:
Object
  • Object
show all
Includes:
DynamicInitializer
Defined in:
lib/ruby-kiva/borrower.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DynamicInitializer

included

Instance Attribute Details

#first_nameObject

Returns the value of attribute first_name.



4
5
6
# File 'lib/ruby-kiva/borrower.rb', line 4

def first_name
  @first_name
end

#genderObject

Returns the value of attribute gender.



4
5
6
# File 'lib/ruby-kiva/borrower.rb', line 4

def gender
  @gender
end

#last_nameObject

Returns the value of attribute last_name.



4
5
6
# File 'lib/ruby-kiva/borrower.rb', line 4

def last_name
  @last_name
end

#picturedObject

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

Returns:

  • (Boolean)


9
10
11
# File 'lib/ruby-kiva/borrower.rb', line 9

def female?
  self.gender == 'F'
end

#male?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/ruby-kiva/borrower.rb', line 6

def male?
  self.gender == 'M'
end

#pictured?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/ruby-kiva/borrower.rb', line 13

def pictured?
  self.pictured
end

#to_sObject



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