Module: FundraisingProgram::Fundable

Included in:
Project
Defined in:
lib/fundraising_program/fundable.rb

Instance Method Summary collapse

Instance Method Details

#add_fundObject



4
5
6
7
# File 'lib/fundraising_program/fundable.rb', line 4

def add_fund
  self.funding += 25
  puts "O projeto #{self.name.upcase} recebeu mais fundos =D."
end

#fully_funded?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/fundraising_program/fundable.rb', line 14

def fully_funded?
  self.total_funds >= self.target_funding
end

#remove_fundObject



9
10
11
12
# File 'lib/fundraising_program/fundable.rb', line 9

def remove_fund
  self.funding -= 15
  puts "O projeto #{self.name.upcase} perdeu alguns fundos =(."
end