Class: ProjectSimulator::TimeConstraint

Inherits:
Object
  • Object
show all
Defined in:
lib/projectsimulator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#timeObject

Returns the value of attribute time.



365
366
367
# File 'lib/projectsimulator.rb', line 365

def time
  @time
end

Instance Method Details

#matchObject



371
372
373
# File 'lib/projectsimulator.rb', line 371

def match()
  ChronicBetween.new(@times).within?(@time)
end