Class: ProjectSimulator::Constraint

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(s, time: nil, debug: false) ⇒ Constraint

Returns a new instance of Constraint.



281
282
283
284
285
286
287
288
289
290
# File 'lib/projectsimulator.rb', line 281

def initialize(s, time: nil, debug: false)
  
  super()
  @time, @debug = time, debug
  
  params = {s: s }
  constraints(params)
  @to_type = find_constraint(s)
  
end

Instance Attribute Details

#to_typeObject (readonly)

Returns the value of attribute to_type.



279
280
281
# File 'lib/projectsimulator.rb', line 279

def to_type
  @to_type
end