Class: Gizzard::AddforwardingCommand

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

Instance Attribute Summary

Attributes inherited from Command

#argv, #buffer, #command_options, #global_options, #job_injector, #manager

Instance Method Summary collapse

Methods inherited from Command

classify, #confirm!, #get_base_name, #help!, #initialize, make_job_injector, make_manager, #output, #require_tables, #require_template_options, run

Constructor Details

This class inherits a constructor from Gizzard::Command

Instance Method Details

#runObject



137
138
139
140
141
142
# File 'lib/gizzard/commands.rb', line 137

def run
  help! if argv.length != 3
  table_id, base_id, shard_id_text = argv
  shard_id = ShardId.parse(shard_id_text)
  manager.set_forwarding(Forwarding.new(table_id.to_i, base_id.to_i, shard_id))
end