Sha256: 676a3a81ee2cf8050ee1ec9e2c5ba9af3d16481f203ae1e6d7ff109bd059e3d5

Contents?: true

Size: 554 Bytes

Versions: 14

Compression:

Stored size: 554 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

14 entries across 14 versions & 1 rubygems

Version Path
eco-helpers-2.7.16 lib/eco/cli.rb
eco-helpers-2.7.15 lib/eco/cli.rb
eco-helpers-2.7.14 lib/eco/cli.rb
eco-helpers-2.7.13 lib/eco/cli.rb
eco-helpers-2.7.12 lib/eco/cli.rb
eco-helpers-2.7.4 lib/eco/cli.rb
eco-helpers-2.7.2 lib/eco/cli.rb
eco-helpers-2.7.1 lib/eco/cli.rb
eco-helpers-2.7.0 lib/eco/cli.rb
eco-helpers-2.6.4 lib/eco/cli.rb
eco-helpers-2.6.3 lib/eco/cli.rb
eco-helpers-2.6.2 lib/eco/cli.rb
eco-helpers-2.6.1 lib/eco/cli.rb
eco-helpers-2.6.0 lib/eco/cli.rb