Sha256: a0964e5b8b6b8c1778c7d7e4797d61044da3aa82c7eedb6bd4eb3a35ce3eb007

Contents?: true

Size: 355 Bytes

Versions: 5

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

5 entries across 5 versions & 1 rubygems

Version Path
anvil-core-0.3.2 lib/tasks/help_task.rb
anvil-core-0.3.1 lib/tasks/help_task.rb
anvil-core-0.3.0 lib/tasks/help_task.rb
anvil-core-0.2.0 lib/tasks/help_task.rb
anvil-core-0.1.0 lib/tasks/help_task.rb