Sha256: de599e0978ec7699b949fc05f83f5961a63515c472cf110aca9ba37da7287872

Contents?: true

Size: 398 Bytes

Versions: 31

Compression:

Stored size: 398 Bytes

Contents

# frozen_string_literal: true

module Grumlin
  class Property
    attr_reader :key, :value

    def initialize(value)
      @key = value[:key]
      @value = 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
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
grumlin-0.23.0 lib/grumlin/property.rb
grumlin-0.22.5 lib/grumlin/property.rb
grumlin-0.22.4 lib/grumlin/property.rb
grumlin-0.22.3 lib/grumlin/property.rb
grumlin-0.22.2 lib/grumlin/property.rb
grumlin-0.22.1 lib/grumlin/property.rb
grumlin-0.22.0 lib/grumlin/property.rb
grumlin-0.21.1 lib/grumlin/property.rb
grumlin-0.21.0 lib/grumlin/property.rb
grumlin-0.20.2 lib/grumlin/property.rb
grumlin-0.20.1 lib/grumlin/property.rb
grumlin-0.20.0 lib/grumlin/property.rb
grumlin-0.19.7 lib/grumlin/property.rb
grumlin-0.19.6 lib/grumlin/property.rb
grumlin-0.19.5 lib/grumlin/property.rb
grumlin-0.19.4 lib/grumlin/property.rb
grumlin-0.19.3 lib/grumlin/property.rb
grumlin-0.19.2 lib/grumlin/property.rb
grumlin-0.19.1 lib/grumlin/property.rb
grumlin-0.19.0 lib/grumlin/property.rb