Class: ConferenceTracker::Event::Constraint
- Inherits:
-
Object
- Object
- ConferenceTracker::Event::Constraint
- Defined in:
- lib/conference_tracker/event.rb
Instance Attribute Summary collapse
-
#early_start ⇒ Object
readonly
Returns the value of attribute early_start.
Instance Method Summary collapse
-
#initialize(early_start) ⇒ Constraint
constructor
A new instance of Constraint.
- #valid?(time) ⇒ Boolean
Constructor Details
#initialize(early_start) ⇒ Constraint
Returns a new instance of Constraint.
8 9 10 |
# File 'lib/conference_tracker/event.rb', line 8 def initialize(early_start) @early_start = Time.parse(early_start) end |
Instance Attribute Details
#early_start ⇒ Object (readonly)
Returns the value of attribute early_start.
6 7 8 |
# File 'lib/conference_tracker/event.rb', line 6 def early_start @early_start end |
Instance Method Details
#valid?(time) ⇒ Boolean
12 13 14 |
# File 'lib/conference_tracker/event.rb', line 12 def valid?(time) time >= @early_start end |