Class: Buildr4OSGi::ArrayAddWithOptions
- Defined in:
- lib/buildr4osgi/eclipse/feature.rb
Instance Method Summary collapse
- #add_with_options(*args) ⇒ Object (also: #<<)
-
#initialize(options_hash) ⇒ ArrayAddWithOptions
constructor
A new instance of ArrayAddWithOptions.
Constructor Details
#initialize(options_hash) ⇒ ArrayAddWithOptions
Returns a new instance of ArrayAddWithOptions.
294 295 296 |
# File 'lib/buildr4osgi/eclipse/feature.rb', line 294 def initialize() @options_hash = end |
Instance Method Details
#add_with_options(*args) ⇒ Object Also known as: <<
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 |
# File 'lib/buildr4osgi/eclipse/feature.rb', line 298 def (*args) plugin = args.shift = {} while(!args.empty?) option = args.shift case when option.is_a?(Hash) .merge!(option) when option.is_a?(Symbol) .merge!({option => true}) else raise "Impossible to find what this option means: #{option}" end end add(plugin) @options_hash[plugin] = end |