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.
297 298 299 |
# File 'lib/buildr4osgi/eclipse/feature.rb', line 297 def initialize() @options_hash = end |
Instance Method Details
#add_with_options(*args) ⇒ Object Also known as: <<
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 |
# File 'lib/buildr4osgi/eclipse/feature.rb', line 301 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 |