Class: CrowdFund::SchoolProject

Inherits:
Object
  • Object
show all
Includes:
Fundable
Defined in:
lib/crowdfund/school_project.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Fundable

#<=>, #funded?, #gained, #lost, #need

Constructor Details

#initialize(name, fund = 0, goal = 100) ⇒ SchoolProject

Returns a new instance of SchoolProject.



11
12
13
14
15
# File 'lib/crowdfund/school_project.rb', line 11

def initialize(name, fund=0, goal=100)
    @name = name
    @fund = fund
    @goal = goal
end

Instance Attribute Details

#fundObject

Returns the value of attribute fund.



8
9
10
# File 'lib/crowdfund/school_project.rb', line 8

def fund
  @fund
end

#goalObject (readonly)

Returns the value of attribute goal.



9
10
11
# File 'lib/crowdfund/school_project.rb', line 9

def goal
  @goal
end

#nameObject

Returns the value of attribute name.



8
9
10
# File 'lib/crowdfund/school_project.rb', line 8

def name
  @name
end