Class: Rake::Funnel::Support::ArgumentMapper::Styles::NUnit

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeNUnit

Returns a new instance of NUnit.



9
10
11
12
13
# File 'lib/rake/funnel/support/argument_mapper/styles/nunit.rb', line 9

def initialize
  @prefix = Rake::Win32.windows? ? '/' : '-'
  @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/nunit.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/nunit.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/nunit.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/nunit.rb', line 15

def generate_from(model)
  model.map { |switch|
    switch.values.flatten.map { |value|
      top_level(switch) + nested(value)
    }
  }.flatten(1)
end