Sha256: 9d53e97f445a12cb2dca372756c080d5b651b4bc2bd7234dd9bd756d8d8d73d1

Contents?: true

Size: 556 Bytes

Versions: 89

Compression:

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

89 entries across 89 versions & 1 rubygems

Version Path
eco-helpers-2.0.65 lib/eco/cli.rb
eco-helpers-2.0.64 lib/eco/cli.rb
eco-helpers-2.0.63 lib/eco/cli.rb
eco-helpers-2.0.62 lib/eco/cli.rb
eco-helpers-2.0.61 lib/eco/cli.rb
eco-helpers-2.0.60 lib/eco/cli.rb
eco-helpers-2.0.59 lib/eco/cli.rb
eco-helpers-2.0.58 lib/eco/cli.rb
eco-helpers-2.0.57 lib/eco/cli.rb
eco-helpers-2.0.56 lib/eco/cli.rb
eco-helpers-2.0.55 lib/eco/cli.rb
eco-helpers-2.0.54 lib/eco/cli.rb
eco-helpers-2.0.53 lib/eco/cli.rb
eco-helpers-2.0.52 lib/eco/cli.rb
eco-helpers-2.0.51 lib/eco/cli.rb
eco-helpers-2.0.50 lib/eco/cli.rb
eco-helpers-2.0.49 lib/eco/cli.rb
eco-helpers-2.0.48 lib/eco/cli.rb
eco-helpers-2.0.47 lib/eco/cli.rb
eco-helpers-2.0.46 lib/eco/cli.rb