class Bundler::Thor::DynamicTask

Parent:
Bundler::Thor::Command

A dynamic command that handles method missing scenarios.

Public Class Methods

new(name, options = nil) Show source
# File lib/bundler/vendor/thor/lib/thor/command.rb, line 129
def initialize(name, options = nil)
  super(name.to_s, "A dynamically-generated command", name.to_s, name.to_s, options)
end
Calls superclass method Bundler::Thor::Command::new

Public Instance Methods

run(instance, args = []) Show source
# File lib/bundler/vendor/thor/lib/thor/command.rb, line 133
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
Calls superclass method Bundler::Thor::Command#run

Ruby Core © 1993–2017 Yukihiro Matsumoto
Licensed under the Ruby License.
Ruby Standard Library © contributors
Licensed under their own licenses.