Class: AgileTrello::CompletedCard
- Inherits:
-
Object
- Object
- AgileTrello::CompletedCard
- Defined in:
- lib/CompletedCard.rb
Constant Summary collapse
- SECONDS_IN_24HRS =
(24 * 60 * 60)
Instance Attribute Summary collapse
-
#cycle_time ⇒ Object
readonly
Returns the value of attribute cycle_time.
Instance Method Summary collapse
-
#initialize(start_date, end_date) ⇒ CompletedCard
constructor
A new instance of CompletedCard.
- #shareCycleTimeWith(calculator) ⇒ Object
Constructor Details
#initialize(start_date, end_date) ⇒ CompletedCard
Returns a new instance of CompletedCard.
7 8 9 |
# File 'lib/CompletedCard.rb', line 7 def initialize(start_date, end_date) @cycle_time = ((end_date - start_date) / SECONDS_IN_24HRS).round(2) end |
Instance Attribute Details
#cycle_time ⇒ Object (readonly)
Returns the value of attribute cycle_time.
5 6 7 |
# File 'lib/CompletedCard.rb', line 5 def cycle_time @cycle_time end |
Instance Method Details
#shareCycleTimeWith(calculator) ⇒ Object
11 12 13 |
# File 'lib/CompletedCard.rb', line 11 def shareCycleTimeWith(calculator) calculator.add(@cycle_time) end |