Class: Timebomb::Bomb
- Inherits:
-
Object
- Object
- Timebomb::Bomb
- Defined in:
- lib/timebomb.rb
Constant Summary collapse
- SECONDS_IN_DAY =
86400
Instance Attribute Summary collapse
-
#date ⇒ Object
Returns the value of attribute date.
-
#description ⇒ Object
Returns the value of attribute description.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
Instance Attribute Details
#date ⇒ Object
Returns the value of attribute date.
205 206 207 |
# File 'lib/timebomb.rb', line 205 def date @date end |
#description ⇒ Object
Returns the value of attribute description.
205 206 207 |
# File 'lib/timebomb.rb', line 205 def description @description end |
#title ⇒ Object
Returns the value of attribute title.
205 206 207 |
# File 'lib/timebomb.rb', line 205 def title @title end |
Instance Method Details
#days_difference ⇒ Object
215 216 217 |
# File 'lib/timebomb.rb', line 215 def days_difference (date - Timebomb.current_time) / SECONDS_IN_DAY end |
#has_exploded? ⇒ Boolean
211 212 213 |
# File 'lib/timebomb.rb', line 211 def has_exploded? date < Timebomb.current_time end |