Sha256: c30f267320b933979f80d01869db56b076e193ca1794195ad3f3599176465943

Contents?: true

Size: 427 Bytes

Versions: 3

Compression:

Stored size: 427 Bytes

Contents

module GitCompound
  module Command
    module Arguments
      module Type
        module Parameter
          # Abstract parameter type
          #
          class Parameter < Type
            def used
              valid? ? [@key, value!].compact : []
            end

            private

            def value!
              @args[@args.index(@key) + 1]
            end
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
git_compound-0.2.2 lib/git_compound/command/arguments/type/parameter/parameter.rb
git_compound-0.2.1 lib/git_compound/command/arguments/type/parameter/parameter.rb
git_compound-0.2.0 lib/git_compound/command/arguments/type/parameter/parameter.rb