Sha256: 54dca61c662a30448ed15951028a15d7328365bb8e41e5879d830b4d9ebe4003

Contents?: true

Size: 355 Bytes

Versions: 3

Compression:

Stored size: 355 Bytes

Contents

require 'anvil/task'

class HelpTask < Anvil::Task
  description 'Help for the anvil tasks. Usage: anvil help TASK'

  parser do
    arguments %w[task_name]
  end

  attr_reader :task_name

  def initialize(task_name, options = {})
    @task_name = task_name
  end

  def task
    klazz = Anvil::Task.from_name(task_name)
    printf(klazz.help)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
anvil-core-0.0.1.pre.alpha.3 lib/tasks/help_task.rb
anvil-core-0.0.1.pre.alpha.2 lib/tasks/help_task.rb
anvil-core-0.0.1.alpha.1 lib/tasks/help_task.rb