Class: Kisaweb::Run

Inherits:
Object show all
Defined in:
lib/kisaweb/run.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_idObject

Returns the value of attribute contest_id.



3
4
5
# File 'lib/kisaweb/run.rb', line 3

def contest_id
  @contest_id
end

#pointsObject

Returns the value of attribute points.



3
4
5
# File 'lib/kisaweb/run.rb', line 3

def points
  @points
end

Instance Method Details

#contestObject



10
11
12
# File 'lib/kisaweb/run.rb', line 10

def contest
  @contest ||= Kisaweb::Contest.find(contest_id)
end