Class: Sashimi::Commands::Add

Inherits:
Object
  • Object
show all
Defined in:
lib/sashimi/commands.rb

Instance Method Summary collapse

Constructor Details

#initialize(base_command) ⇒ Add

Returns a new instance of Add.



191
192
193
# File 'lib/sashimi/commands.rb', line 191

def initialize(base_command)
  @base_command = base_command        
end

Instance Method Details

#optionsObject



195
196
197
198
199
200
201
# File 'lib/sashimi/commands.rb', line 195

def options
  OptionParser.new do |o|
    o.set_summary_indent('  ')
    o.banner =    "Usage: #{@base_command.script_name} add PLUGIN"
    o.define_head "Add installed plugin(s) to a Rails app."
  end
end

#parse!(args) ⇒ Object



203
204
205
206
207
208
# File 'lib/sashimi/commands.rb', line 203

def parse!(args)
  options.parse!(args)
  args.each do |name|
    Plugin.new(name).add
  end
end