Class: Kisaweb::Run
Instance Attribute Summary collapse
-
#contest_id ⇒ Object
Returns the value of attribute contest_id.
-
#points ⇒ Object
Returns the value of attribute points.
Instance Method Summary collapse
- #contest ⇒ Object
-
#initialize(contest_id, points) ⇒ Run
constructor
A new instance of Run.
Constructor Details
#initialize(contest_id, points) ⇒ Run
Returns a new instance of Run.
5 6 7 8 |
# File 'lib/kisaweb/run.rb', line 5 def initialize(contest_id, points) self.contest_id = contest_id self.points = BigDecimal.new(points) end |
Instance Attribute Details
#contest_id ⇒ Object
Returns the value of attribute contest_id.
3 4 5 |
# File 'lib/kisaweb/run.rb', line 3 def contest_id @contest_id end |
#points ⇒ Object
Returns the value of attribute points.
3 4 5 |
# File 'lib/kisaweb/run.rb', line 3 def points @points end |
Instance Method Details
#contest ⇒ Object
10 11 12 |
# File 'lib/kisaweb/run.rb', line 10 def contest @contest ||= Kisaweb::Contest.find(contest_id) end |