class Tumugi::Command::New

Public Instance Methods

create_generator(type, name, options) click to toggle source
# File lib/tumugi/command/new.rb, line 16
def create_generator(type, name, options)
  case type
  when "plugin"
    PluginGenerator.new(name, options)
  when "project"
    ProjectGenerator.new(name, options)
  else
    raise Tumugi::TumugiError.new("Unsupported type of new sub command: #{type}")
  end
end
execute(type, name, options={}) click to toggle source
# File lib/tumugi/command/new.rb, line 7
def execute(type, name, options={})
  generator = create_generator(type, name, options)
  generator.generate
end
logger() click to toggle source
# File lib/tumugi/command/new.rb, line 12
def logger
  @logger ||= Tumugi::ScopedLogger.new("tumugi-new")
end