lib/rake/funnel/support/argument_mapper/styles/nunit.rb in rake-funnel-0.3.2.pre vs lib/rake/funnel/support/argument_mapper/styles/nunit.rb in rake-funnel-0.4.0.pre
- old
+ new
@@ -1,33 +1,41 @@
-module Rake::Funnel::Support::ArgumentMapper::Styles
- class NUnit
- attr_reader :prefix, :separator, :value_separator
-
- def initialize
- @prefix = Rake::Win32.windows? ? '/' : '-'
- @separator = '='
- @value_separator = ':'
- end
-
- def generate_from(model)
- model.map { |switch|
- switch.values.flatten.map { |value|
- top_level(switch) + nested(value)
- }
- }.flatten(1)
- end
-
- private
- def top_level(switch)
- [prefix, switch.switch]
- end
-
- def nested(value)
- res = []
- res << separator unless value.key.nil? && value.value.nil?
- res << value.key
- res << value_separator unless value.key.nil? || value.value.nil?
- res << value.value
- res.compact
- end
- end
-end
+module Rake
+ module Funnel
+ module Support
+ module ArgumentMapper
+ module Styles
+ class NUnit
+ attr_reader :prefix, :separator, :value_separator
+
+ def initialize
+ @prefix = Rake::Win32.windows? ? '/' : '-'
+ @separator = '='
+ @value_separator = ':'
+ end
+
+ def generate_from(model)
+ model.map { |switch|
+ switch.values.flatten.map { |value|
+ top_level(switch) + nested(value)
+ }
+ }.flatten(1)
+ end
+
+ private
+ def top_level(switch)
+ [prefix, switch.switch]
+ end
+
+ def nested(value)
+ res = []
+ res << separator unless value.key.nil? && value.value.nil?
+ res << value.key
+ res << value_separator unless value.key.nil? || value.value.nil?
+ res << value.value
+ res.compact
+ end
+ end
+ end
+ end
+ end
+ end
+end