Class: ZabbixRubyClient::Cli
- Inherits:
-
Thor
- Object
- Thor
- ZabbixRubyClient::Cli
- Includes:
- Thor::Actions
- Defined in:
- lib/zabbix-ruby-client/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
9 10 11 |
# File 'lib/zabbix-ruby-client/cli.rb', line 9 def self.source_root File.("../../../templates", __FILE__) end |
Instance Method Details
#init(name = "zabbix-ruby-client") ⇒ Object
21 22 23 |
# File 'lib/zabbix-ruby-client/cli.rb', line 21 def init(name = "zabbix-ruby-client") directory "client", name end |
#show ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/zabbix-ruby-client/cli.rb', line 26 def show begin Bundler.require rescue Bundler::GemfileNotFound say "No Gemfile found", :red abort end zrc = ZabbixRubyClient.new([:configfile]) zrc.collect zrc.show end |
#upload ⇒ Object
39 40 41 42 43 |
# File 'lib/zabbix-ruby-client/cli.rb', line 39 def upload zrc = ZabbixRubyClient.new([:configfile]) zrc.collect zrc.upload end |