Class: Rake::Funnel::Support::ArgumentMapper::Styles::MSBuild

Inherits:
Object
  • Object
show all
Defined in:
lib/rake/funnel/support/argument_mapper/styles/msbuild.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMSBuild

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

#prefixObject (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

#separatorObject (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_separatorObject (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