Class: Eco::CLI
- Inherits:
-
Object
show all
- Defined in:
- lib/eco/cli.rb,
lib/eco/cli/config.rb,
lib/eco/cli/scripting.rb,
lib/eco/cli/config/help.rb,
lib/eco/cli/config/input.rb,
lib/eco/cli/config/filters.rb,
lib/eco/cli/config/use_cases.rb,
lib/eco/cli/config/options_set.rb,
lib/eco/cli/scripting/argument.rb,
lib/eco/cli/scripting/arguments.rb,
lib/eco/cli/scripting/args_helpers.rb,
lib/eco/cli/config/filters/input_filters.rb,
lib/eco/cli/config/filters/people_filters.rb
Defined Under Namespace
Classes: Config, Scripting
Instance Method Summary
collapse
Constructor Details
#initialize ⇒ CLI
Returns a new instance of CLI.
3
4
5
|
# File 'lib/eco/cli.rb', line 3
def initialize
@config = nil
end
|
Instance Method Details
7
8
9
|
# File 'lib/eco/cli.rb', line 7
def args
ARGV
end
|
15
16
17
18
19
20
|
# File 'lib/eco/cli.rb', line 15
def config
@config ||= Eco::CLI::Config.new(cli: self)
@config.tap do |cnf|
yield(cnf) if block_given?
end
end
|
11
12
13
|
# File 'lib/eco/cli.rb', line 11
def options
@options ||= {}
end
|
#run(session:) ⇒ Object
22
23
24
25
|
# File 'lib/eco/cli.rb', line 22
def run(session:)
io = Eco::API::UseCases::BaseIO.new(session: session, options: options)
session.workflow(io: io).run(io: io)
end
|