Class: Rake::Funnel::Support::ArgumentMapper::Styles::MSBuild
- Inherits:
-
Object
- Object
- Rake::Funnel::Support::ArgumentMapper::Styles::MSBuild
- Defined in:
- lib/rake/funnel/support/argument_mapper/styles/msbuild.rb
Instance Attribute Summary collapse
-
#prefix ⇒ Object
readonly
Returns the value of attribute prefix.
-
#separator ⇒ Object
readonly
Returns the value of attribute separator.
-
#value_separator ⇒ Object
readonly
Returns the value of attribute value_separator.
Instance Method Summary collapse
- #generate_from(model) ⇒ Object
-
#initialize ⇒ MSBuild
constructor
A new instance of MSBuild.
Constructor Details
#initialize ⇒ MSBuild
Returns a new instance of MSBuild.
9 10 11 12 13 |
# File 'lib/rake/funnel/support/argument_mapper/styles/msbuild.rb', line 9 def initialize @prefix = '/' @separator = ':' @value_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/msbuild.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/msbuild.rb', line 7 def separator @separator end |
#value_separator ⇒ Object (readonly)
Returns the value of attribute value_separator.
7 8 9 |
# File 'lib/rake/funnel/support/argument_mapper/styles/msbuild.rb', line 7 def value_separator @value_separator end |
Instance Method Details
#generate_from(model) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/rake/funnel/support/argument_mapper/styles/msbuild.rb', line 15 def generate_from(model) model.map { |switch| switch.values.flatten.map { |value| top_level(switch) + nested(value) } }.flatten(1) end |