Class: Thor::DynamicTask

### Home Classes Methods

### In Files

- lib/thor/command.rb

### Parent

Thor::Command

### Methods

- ::new
- #run

### Class/Module Index

Quicksearch

- Thor
- Thor::Actions
- Thor::Actions::ClassMethods
- Thor::Base
- Thor::Base::ClassMethods
- Thor::Command
- Thor::DynamicCommand
- Thor::DynamicTask
- Thor::Error
- Thor::Group
- Thor::HiddenCommand
- Thor::HiddenTask
- Thor::InvocationError
- Thor::MalformattedArgumentError
- Thor::RakeCompat
- Thor::RequiredArgumentMissingError
- Thor::Shell
- Thor::Shell::Basic
- Thor::Shell::Color
- Thor::Shell::HTML
- Thor::Task
- Thor::UndefinedCommandError
- Thor::UndefinedTaskError
- Thor::UnknownArgumentError
- Thor::Util
- Object

No matching classes.

# Thor::DynamicTask

A dynamic command that handles method missing scenarios.

### Public Class Methods

new(name, options=nil) click to toggle source

    # File lib/thor/command.rb, line 122
    def initialize(name, options=nil)
      super(name.to_s, "A dynamically-generated command", name.to_s, name.to_s, options)
    end

### Public Instance Methods

run(instance, args=[]) click to toggle source

    # File lib/thor/command.rb, line 126
    def run(instance, args=[])
      if (instance.methods & [name.to_s, name.to_sym]).empty?
        super
      else
        instance.class.handle_no_command_error(name)
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.