Class: ProjectSimulator::TimeConstraint
- Inherits:
-
Object
- Object
- ProjectSimulator::TimeConstraint
- Defined in:
- lib/projectsimulator.rb
Instance Attribute Summary collapse
-
#time ⇒ Object
Returns the value of attribute time.
Instance Method Summary collapse
-
#initialize(times, time: nil) ⇒ TimeConstraint
constructor
A new instance of TimeConstraint.
- #match ⇒ Object
Constructor Details
#initialize(times, time: nil) ⇒ TimeConstraint
Returns a new instance of TimeConstraint.
367 368 369 |
# File 'lib/projectsimulator.rb', line 367 def initialize(times, time: nil) @times, @time = times, time end |
Instance Attribute Details
#time ⇒ Object
Returns the value of attribute time.
365 366 367 |
# File 'lib/projectsimulator.rb', line 365 def time @time end |
Instance Method Details
#match ⇒ Object
371 372 373 |
# File 'lib/projectsimulator.rb', line 371 def match() ChronicBetween.new(@times).within?(@time) end |