Sha256: afa88571dcbe7dc0932c7bb93bb9010a0b4abe51e061ce67aefab56c8c6a025e

Contents?: true

Size: 441 Bytes

Versions: 21

Compression:

Stored size: 441 Bytes

Contents

class Code
  class Object
    class Argument
      attr_reader :value, :name

      def initialize(value, name: nil)
        @value = value
        @name = name
      end

      def regular?
        !name
      end

      def keyword?
        !regular?
      end

      def name_value
        [name, value]
      end

      def to_s
        "<Argument #{value.inspect}>"
      end

      def inspect
        to_s
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 3 rubygems

Version Path
template-ruby-0.5.6 lib/code/object/argument.rb
language-ruby-0.5.6 lib/code/object/argument.rb
code-ruby-0.5.6 lib/code/object/argument.rb
template-ruby-0.5.5 lib/code/object/argument.rb
language-ruby-0.5.5 lib/code/object/argument.rb
code-ruby-0.5.5 lib/code/object/argument.rb
template-ruby-0.5.4 lib/code/object/argument.rb
language-ruby-0.5.4 lib/code/object/argument.rb
code-ruby-0.5.4 lib/code/object/argument.rb
template-ruby-0.5.3 lib/code/object/argument.rb
language-ruby-0.5.3 lib/code/object/argument.rb
code-ruby-0.5.3 lib/code/object/argument.rb
template-ruby-0.5.2 lib/code/object/argument.rb
language-ruby-0.5.2 lib/code/object/argument.rb
code-ruby-0.5.2 lib/code/object/argument.rb
language-ruby-0.5.1 lib/code/object/argument.rb
template-ruby-0.5.1 lib/code/object/argument.rb
code-ruby-0.5.1 lib/code/object/argument.rb
template-ruby-0.5.0 lib/code/object/argument.rb
language-ruby-0.5.0 lib/code/object/argument.rb