Class: WeighflowCli::Cli

Inherits:
Thor
  • Object
show all
Includes:
Rendering
Defined in:
lib/weighflow_cli/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Rendering

#options_renderer

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/weighflow_cli/cli.rb', line 16

def self.exit_on_failure?
  false
end

Instance Method Details

#data_pathObject



27
28
29
# File 'lib/weighflow_cli/cli.rb', line 27

def data_path
  puts WeighflowCli.data_path
end

#find_order(external_id) ⇒ Object



56
57
58
59
60
61
62
# File 'lib/weighflow_cli/cli.rb', line 56

def find_order(external_id)             
  if index = WeighflowCli.find_order(external_id) 
    options_renderer(index.data, options)
  else
    options_renderer(nil, options)  
  end      
end

#indexesObject



50
51
52
# File 'lib/weighflow_cli/cli.rb', line 50

def indexes
  options_renderer(WeighflowCli.list(indexes_only: true), options) 
end

#listObject



45
46
47
# File 'lib/weighflow_cli/cli.rb', line 45

def list
  options_renderer(WeighflowCli.list, options) 
end

#loginObject



33
34
35
# File 'lib/weighflow_cli/cli.rb', line 33

def 
  Credentials.      
end

#pullObject



39
40
41
# File 'lib/weighflow_cli/cli.rb', line 39

def pull 
  options_renderer(WeighflowCli.pull, options)
end

#statusObject



21
22
23
# File 'lib/weighflow_cli/cli.rb', line 21

def status 
  options_renderer(WeighflowCli.client.status, options)
end