Class: Logcli::CLI
- Inherits:
-
Thor
- Object
- Thor
- Logcli::CLI
- Defined in:
- lib/cli.rb
Instance Method Summary collapse
Instance Method Details
#elasticsearch ⇒ Object
38 39 40 41 42 |
# File 'lib/cli.rb', line 38 def elasticsearch params = Logcli::Params::Elasticsearch.new json = Logcli::Actions::Elasticsearch.new(params.parse_params) json.call end |
#extract_json ⇒ Object
27 28 29 30 31 |
# File 'lib/cli.rb', line 27 def extract_json params = Logcli::Params::Json.new json = Logcli::Actions::ExtractJson.new(params.parse_params) json.call end |
#fetch ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/cli.rb', line 13 def fetch params = Logcli::Params::Session.new ssh = Logcli::SSH.new params grep = Logcli::Actions::Grep.new params.action_params grep.call ssh scp = Logcli::SCP.new params download = Logcli::Actions::Download.new({remote_path: grep.tmp_path, local_path: params.local_path }) download.call scp end |