Class: Rake::Funnel::Support::ArgumentMapper::Styles::MSDeploy
- Inherits:
-
Object
- Object
- Rake::Funnel::Support::ArgumentMapper::Styles::MSDeploy
- Defined in:
- lib/rake/funnel/support/argument_mapper/styles/msdeploy.rb
Instance Attribute Summary collapse
-
#prefix ⇒ Object
readonly
Returns the value of attribute prefix.
-
#separator ⇒ Object
readonly
Returns the value of attribute separator.
-
#value_list_separator ⇒ Object
readonly
Returns the value of attribute value_list_separator.
-
#value_separator ⇒ Object
readonly
Returns the value of attribute value_separator.
Instance Method Summary collapse
- #generate_from(model) ⇒ Object
-
#initialize ⇒ MSDeploy
constructor
A new instance of MSDeploy.
Constructor Details
#initialize ⇒ MSDeploy
Returns a new instance of MSDeploy.
9 10 11 12 13 14 |
# File 'lib/rake/funnel/support/argument_mapper/styles/msdeploy.rb', line 9 def initialize @prefix = '-' @separator = ':' @value_separator = '=' @value_list_separator = ',' end |
Instance Attribute Details
#prefix ⇒ Object (readonly)
Returns the value of attribute prefix.
7 8 9 |
# File 'lib/rake/funnel/support/argument_mapper/styles/msdeploy.rb', line 7 def prefix @prefix end |
#separator ⇒ Object (readonly)
Returns the value of attribute separator.
7 8 9 |
# File 'lib/rake/funnel/support/argument_mapper/styles/msdeploy.rb', line 7 def separator @separator end |
#value_list_separator ⇒ Object (readonly)
Returns the value of attribute value_list_separator.
7 8 9 |
# File 'lib/rake/funnel/support/argument_mapper/styles/msdeploy.rb', line 7 def value_list_separator @value_list_separator end |
#value_separator ⇒ Object (readonly)
Returns the value of attribute value_separator.
7 8 9 |
# File 'lib/rake/funnel/support/argument_mapper/styles/msdeploy.rb', line 7 def value_separator @value_separator end |
Instance Method Details
#generate_from(model) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/rake/funnel/support/argument_mapper/styles/msdeploy.rb', line 16 def generate_from(model) model.flat_map do |switch| switch.values.map do |item| values = if item.is_a?(Enumerable) item.map.with_index { |nested, index| nested(nested, index) } else nested(item) end (top_level(switch) + values).flatten end end end |