Class: WeighflowCli::Cli
- Inherits:
-
Thor
- Object
- Thor
- WeighflowCli::Cli
- Includes:
- Rendering
- Defined in:
- lib/weighflow_cli/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
- #data_path ⇒ Object
- #find_order(external_id) ⇒ Object
- #indexes ⇒ Object
- #list ⇒ Object
- #login ⇒ Object
- #pull ⇒ Object
- #status ⇒ Object
Methods included from Rendering
Class Method Details
.exit_on_failure? ⇒ Boolean
16 17 18 |
# File 'lib/weighflow_cli/cli.rb', line 16 def self.exit_on_failure? false end |
Instance Method Details
#data_path ⇒ Object
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) (index.data, ) else (nil, ) end end |
#indexes ⇒ Object
50 51 52 |
# File 'lib/weighflow_cli/cli.rb', line 50 def indexes (WeighflowCli.list(indexes_only: true), ) end |
#list ⇒ Object
45 46 47 |
# File 'lib/weighflow_cli/cli.rb', line 45 def list (WeighflowCli.list, ) end |
#login ⇒ Object
33 34 35 |
# File 'lib/weighflow_cli/cli.rb', line 33 def login Credentials.login end |
#pull ⇒ Object
39 40 41 |
# File 'lib/weighflow_cli/cli.rb', line 39 def pull (WeighflowCli.pull, ) end |
#status ⇒ Object
21 22 23 |
# File 'lib/weighflow_cli/cli.rb', line 21 def status (WeighflowCli.client.status, ) end |