Method: Inventory::Rake::Tasks::Compile#initialize

Defined in:
lib/inventory-rake-1.0/tasks/compile.rb

#initialize(options = {}) {|?| ... } ⇒ Compile

Sets up tasks based on INVENTORY, optionally yields the task object for further customization, then #defines the tasks.

Parameters:

  • options (Hash) (defaults to: {})

Options Hash (options):

  • :inventory (Inventory) — default: Inventory::Rake::Tasks.inventory

    The inventory to use

Yields:

  • (?)

Yield Parameters:

  • task (self)


15
16
17
18
19
# File 'lib/inventory-rake-1.0/tasks/compile.rb', line 15

def initialize(options = {})
  self.inventory = options.fetch(:inventory, Inventory::Rake::Tasks.inventory)
  yield self if block_given?
  define
end