Method: GetText::Tools::Task#initialize

Defined in:
lib/gettext/tools/task.rb

#initialize(spec = nil) ⇒ Task

Returns a new instance of Task.

Parameters:

  • spec (Gem::Specification, nil) (defaults to: nil)

    Package information associated with the task. Some information are extracted from the spec.

See Also:



174
175
176
177
178
179
180
181
182
# File 'lib/gettext/tools/task.rb', line 174

def initialize(spec=nil)
  initialize_variables
  self.spec = spec
  if spec
    yield(self) if block_given?
    warn("Use #{self.class.name}.define instead of #{self.class.name}.new(spec).")
    define
  end
end