class Birdwatcher::Commands::Use

Public Instance Methods

run() click to toggle source
# File lib/birdwatcher/commands/use.rb, line 10
def run
  if !arguments?
    error("You must provide a module path")
    return false
  end

  if !_module = Birdwatcher::Module.module_by_path(arguments.first)
    error("Unknown module: #{arguments.first.bold}")
    return false
  end

  console.current_module = _module
end