Sha256: 55bde37d395e866ad09a1dcecbd44018854f1be484ada61168980b12255ba476

Contents?: true

Size: 365 Bytes

Versions: 15

Compression:

Stored size: 365 Bytes

Contents

# frozen_string_literal: true

class Grumlin::Property
  attr_reader :key, :value

  def initialize(value)
    @key = value[:key]
    @value = Grumlin::Typing.cast(value[:value])
  end

  def inspect
    "p[#{key}->#{value}]"
  end

  def to_s
    inspect
  end

  def ==(other)
    self.class == other.class && @key == other.key && @value == other.value
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
grumlin-1.2.0 lib/grumlin/property.rb
grumlin-1.1.0 lib/grumlin/property.rb
grumlin-1.0.4 lib/grumlin/property.rb
grumlin-1.0.3 lib/grumlin/property.rb
grumlin-1.0.3.beta1 lib/grumlin/property.rb
grumlin-1.0.2 lib/grumlin/property.rb
grumlin-1.0.1 lib/grumlin/property.rb
grumlin-1.0.0 lib/grumlin/property.rb
grumlin-1.0.0.rc7 lib/grumlin/property.rb
grumlin-1.0.0.rc6 lib/grumlin/property.rb
grumlin-1.0.0.rc5 lib/grumlin/property.rb
grumlin-1.0.0.rc4 lib/grumlin/property.rb
grumlin-1.0.0.rc3 lib/grumlin/property.rb
grumlin-1.0.0.rc2 lib/grumlin/property.rb
grumlin-1.0.0.rc1 lib/grumlin/property.rb