Class: CrowdFund::SchoolProject
- Inherits:
-
Object
- Object
- CrowdFund::SchoolProject
- Includes:
- Fundable
- Defined in:
- lib/crowdfund/school_project.rb
Instance Attribute Summary collapse
-
#fund ⇒ Object
Returns the value of attribute fund.
-
#goal ⇒ Object
readonly
Returns the value of attribute goal.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, fund = 0, goal = 100) ⇒ SchoolProject
constructor
A new instance of SchoolProject.
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
#fund ⇒ Object
Returns the value of attribute fund.
8 9 10 |
# File 'lib/crowdfund/school_project.rb', line 8 def fund @fund end |
#goal ⇒ Object (readonly)
Returns the value of attribute goal.
9 10 11 |
# File 'lib/crowdfund/school_project.rb', line 9 def goal @goal end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/crowdfund/school_project.rb', line 8 def name @name end |