Class: Sashimi::Commands::Update

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

Instance Method Summary collapse

Constructor Details

#initialize(base_command) ⇒ Update

Returns a new instance of Update.



123
124
125
# File 'lib/sashimi/commands.rb', line 123

def initialize(base_command)
  @base_command = base_command        
end

Instance Method Details

#optionsObject



127
128
129
130
131
132
133
# File 'lib/sashimi/commands.rb', line 127

def options
  OptionParser.new do |o|
    o.set_summary_indent('  ')
    o.banner =    "Usage: #{@base_command.script_name} update PLUGIN"
    o.define_head "Update an installed plugin."
  end
end

#parse!(args) ⇒ Object



135
136
137
138
139
140
# File 'lib/sashimi/commands.rb', line 135

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