Class: Eso::StepConfiguration
- Inherits:
-
Object
- Object
- Eso::StepConfiguration
- Defined in:
- lib/eso/step_configuration.rb
Defined Under Namespace
Modules: ConfigParamProperties, ConfigParamPropertyTypes
Instance Attribute Summary collapse
-
#configurationParams ⇒ Object
Returns the value of attribute configurationParams.
-
#previousTypeName ⇒ Object
Returns the value of attribute previousTypeName.
-
#typeName ⇒ Object
Returns the value of attribute typeName.
-
#workflowID ⇒ Object
Returns the value of attribute workflowID.
Instance Method Summary collapse
-
#add_property(name, value) ⇒ StepConfiguration
This adds the specified property to this StepConfiguration.configurationParams.properties Hash.
-
#initialize(typeName, previousTypeName, configurationParams = nil, workflowID = nil) ⇒ StepConfiguration
constructor
A new instance of StepConfiguration.
- #to_h ⇒ Object
Constructor Details
#initialize(typeName, previousTypeName, configurationParams = nil, workflowID = nil) ⇒ StepConfiguration
Returns a new instance of StepConfiguration.
23 24 25 26 27 28 29 30 31 |
# File 'lib/eso/step_configuration.rb', line 23 def initialize (typeName, previousTypeName, configurationParams=nil, workflowID=nil) @typeName = typeName @previousTypeName = previousTypeName @configurationParams = configurationParams ? configurationParams : { :valueClass => Values::OBJECT, :objectType => 'params', :properties => {}} @workflowID = workflowID if workflowID end |
Instance Attribute Details
#configurationParams ⇒ Object
Returns the value of attribute configurationParams.
3 4 5 |
# File 'lib/eso/step_configuration.rb', line 3 def configurationParams @configurationParams end |
#previousTypeName ⇒ Object
Returns the value of attribute previousTypeName.
3 4 5 |
# File 'lib/eso/step_configuration.rb', line 3 def previousTypeName @previousTypeName end |
#typeName ⇒ Object
Returns the value of attribute typeName.
3 4 5 |
# File 'lib/eso/step_configuration.rb', line 3 def typeName @typeName end |
#workflowID ⇒ Object
Returns the value of attribute workflowID.
3 4 5 |
# File 'lib/eso/step_configuration.rb', line 3 def workflowID @workflowID end |
Instance Method Details
#add_property(name, value) ⇒ StepConfiguration
This adds the specified property to this StepConfiguration.configurationParams.properties Hash
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/eso/step_configuration.rb', line 38 def add_property(name, value) @configurationParams[:properties][name] = case name when *ConfigParamPropertyTypes::BOOLEAN { valueClass: Values::BOOLEAN, value: value } when *ConfigParamPropertyTypes::INTEGER { valueClass: Values::INTEGER, value: value } when *ConfigParamPropertyTypes::STRING { valueClass: Values::STRING, value: value } else raise ArgumentError, "Invalid StepConfiguration ConfigurationParameter Property name: #{name}. " + 'Should be one of StepConfiguration::ConfigParamProperties' end self end |
#to_h ⇒ Object
63 64 65 66 67 68 69 70 71 |
# File 'lib/eso/step_configuration.rb', line 63 def to_h hash = { :typeName => @typeName, :previousTypeName => @previousTypeName, :configurationParams => @configurationParams } hash['workflowID'] = @workflowID if @workflowID hash end |