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.



184
185
186
# File 'lib/sashimi/commands.rb', line 184

def initialize(base_command)
  @base_command = base_command        
end

Instance Method Details

#optionsObject



188
189
190
191
192
193
194
# File 'lib/sashimi/commands.rb', line 188

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



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

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