Sha256: a8591bd3b425fefb06692f08da8f028600564d4a938d71de4799cead62f29108

Contents?: true

Size: 552 Bytes

Versions: 31

Compression:

Stored size: 552 Bytes

Contents

module Eco
  class CLI
    def initialize
      @config = nil
    end

    def args
      ARGV
    end

    def options
      @options ||= {}
    end

    def config
      @config ||= Eco::CLI::Config.new(cli: self)
      @config.tap do |cnf|
        yield(cnf) if block_given?
      end
    end

    def run(session:)
      io = Eco::API::UseCases::BaseIO.new(session: session, options: options)
      session.workflow(io: io).run(io: io)
    end
  end
end

require_relative 'cli/scripting'
require_relative 'cli/config'

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
eco-helpers-3.0.21 lib/eco/cli.rb
eco-helpers-3.0.20 lib/eco/cli.rb
eco-helpers-3.0.19 lib/eco/cli.rb
eco-helpers-3.0.18 lib/eco/cli.rb
eco-helpers-3.0.17 lib/eco/cli.rb
eco-helpers-3.0.16 lib/eco/cli.rb
eco-helpers-3.0.15 lib/eco/cli.rb
eco-helpers-3.0.14 lib/eco/cli.rb
eco-helpers-3.0.13 lib/eco/cli.rb
eco-helpers-3.0.12 lib/eco/cli.rb
eco-helpers-3.0.11 lib/eco/cli.rb
eco-helpers-3.0.10 lib/eco/cli.rb
eco-helpers-3.0.9 lib/eco/cli.rb
eco-helpers-3.0.8 lib/eco/cli.rb
eco-helpers-3.0.7 lib/eco/cli.rb
eco-helpers-3.0.6 lib/eco/cli.rb
eco-helpers-3.0.5 lib/eco/cli.rb
eco-helpers-3.0.4 lib/eco/cli.rb
eco-helpers-3.0.3 lib/eco/cli.rb
eco-helpers-3.0.2 lib/eco/cli.rb