Class: DdPostGauge::Cli

Inherits:
Thor
  • Object
show all
Defined in:
lib/dd_post_gauge/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/dd_post_gauge/cli.rb', line 32

def self.exit_on_failure?
  pp "Exit on failure"
end

Instance Method Details

#callObject



22
23
24
25
26
27
28
29
30
# File 'lib/dd_post_gauge/cli.rb', line 22

def call
  client = DdPostGauge::Client.new(api_key: options[:api_key], site: options[:site])
  client.call(
    options[:metric_name],
    options[:value],
    resource_name: options[:resource_name],
    type_name: options[:type_name]
  )
end

#versionObject



10
11
12
# File 'lib/dd_post_gauge/cli.rb', line 10

def version
  puts DdPostGauge::VERSION
end