Class: Rankum::Runners::CLIOutputer

Inherits:
Object
  • Object
show all
Includes:
Utils::Interactor
Defined in:
lib/rankum/runners/cli_outputer.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Utils::Interactor

#context, #execute, #fail!, #initialize, #organize, #success!

Class Method Details

.run(context = {}) ⇒ Object



9
10
11
# File 'lib/rankum/runners/cli_outputer.rb', line 9

def self.run context={}
  CLIOutputer.new(context).run
end

Instance Method Details

#runObject



13
14
15
16
17
18
19
# File 'lib/rankum/runners/cli_outputer.rb', line 13

def run
  execute do
    fail! unless raw_value
    context.value = round(raw_value)
    context.output = output
  end
end