Class: Elastomer::CLI::Application
- Defined in:
- lib/elastomer/cli/application.rb
Instance Method Summary collapse
Instance Method Details
#cat(command = nil, *args) ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/elastomer/cli/application.rb', line 46 def cat(command=nil, *args) scope, params = extract_cat_scope(*args) params = {'v' => true}.merge(params) if command == 'help' command = nil if scope && !scope.empty? command = scope scope = nil params['help'] = true end end template = Addressable::Template.new("/_cat{/command}{/scope}") path = template.(:command => command, :scope => scope) response = client.request(:get, path, params).body puts response end |
#shard_stats ⇒ Object
21 22 23 |
# File 'lib/elastomer/cli/application.rb', line 21 def shard_stats puts ShardStats.table end |