Class: Brandmaker::JobConfig
- Inherits:
-
Object
- Object
- Brandmaker::JobConfig
- Defined in:
- lib/brandmaker/job_config.rb
Instance Attribute Summary collapse
-
#technical_name ⇒ Object
Returns the value of attribute technical_name.
-
#variables ⇒ Object
Returns the value of attribute variables.
Instance Method Summary collapse
- #add_variables(*vars) ⇒ Object
-
#initialize(technical_name, variables = []) ⇒ JobConfig
constructor
A new instance of JobConfig.
Constructor Details
#initialize(technical_name, variables = []) ⇒ JobConfig
Returns a new instance of JobConfig.
6 7 8 9 |
# File 'lib/brandmaker/job_config.rb', line 6 def initialize technical_name, variables = [] @technical_name = technical_name @variables = variables end |
Instance Attribute Details
#technical_name ⇒ Object
Returns the value of attribute technical_name.
3 4 5 |
# File 'lib/brandmaker/job_config.rb', line 3 def technical_name @technical_name end |
#variables ⇒ Object
Returns the value of attribute variables.
4 5 6 |
# File 'lib/brandmaker/job_config.rb', line 4 def variables @variables end |
Instance Method Details
#add_variables(*vars) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/brandmaker/job_config.rb', line 11 def add_variables *vars vars.each_with_index do |var, index| hash = var.is_a?(Hash) ? var : { :name => var } variables << VariableConfig.new(hash) end end |