Class: TokenHawk::CLI::Commands::Efficiency

Inherits:
Object
  • Object
show all
Includes:
Formatter
Defined in:
lib/token_hawk/cli/commands/efficiency.rb

Instance Method Summary collapse

Methods included from Formatter

#format_cost

Constructor Details

#initialize(options = {}) ⇒ Efficiency

Returns a new instance of Efficiency.



11
12
13
# File 'lib/token_hawk/cli/commands/efficiency.rb', line 11

def initialize(options = {})
  @options = options
end

Instance Method Details

#run ⇒ Object



15
16
17
18
# File 'lib/token_hawk/cli/commands/efficiency.rb', line 15

def run
  results = ranked_results
  @options["format"] == "json" ? print_json(results) : print_table(results)
end