Class: DopCommon::StepSet

Inherits:
Object
  • Object
show all
Includes:
Validator
Defined in:
lib/dop_common/step_set.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Validator

#log_validation_method, #set_not_valid, #try_validate_obj, #valid?

Constructor Details

#initialize(name, steps_array) ⇒ StepSet

Returns a new instance of StepSet.



11
12
13
14
# File 'lib/dop_common/step_set.rb', line 11

def initialize(name, steps_array)
  @name = name
  @steps_array = steps_array
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



9
10
11
# File 'lib/dop_common/step_set.rb', line 9

def name
  @name
end

Instance Method Details

#stepsObject



21
22
23
# File 'lib/dop_common/step_set.rb', line 21

def steps
  @steps ||= steps_valid? ? create_steps : nil
end

#validateObject



16
17
18
19
# File 'lib/dop_common/step_set.rb', line 16

def validate
  log_validation_method(:steps_valid?)
  try_validate_obj("StepSet #{name}: Can't validate the steps part because of a previous error"){steps}
end