Sha256: 3260d1cf39ea872ffea971cc5a5d06bbe1974038454db15e34f1eaa26bf2cac8

Contents?: true

Size: 308 Bytes

Versions: 9

Compression:

Stored size: 308 Bytes

Contents

module Cumuli
  class CLI
    class Args
      attr_reader :argv, :dir

      def initialize(argv)
        @argv = argv
        @dir ||= argv.shift
      end

      def name
        @name ||= dir.match(/([a-z_]+)$/i)[0]
      end

      def foreman_options
        argv.join(' ')
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cumuli-0.5.0 lib/cumuli/cli/args.rb
cumuli-0.4.1 lib/cumuli/cli/args.rb
cumuli-0.4.0 lib/cumuli/cli/args.rb
cumuli-0.3.4 lib/cumuli/cli/args.rb
cumuli-0.3.2 lib/cumuli/cli/args.rb
cumuli-0.3.1 lib/cumuli/cli/args.rb
cumuli-0.3.0 lib/cumuli/cli/args.rb
cumuli-0.2.1 lib/cumuli/cli/args.rb
cumuli-0.2.0 lib/cumuli/cli/args.rb