Exception: PigeonHole::TypedJSON::DuplicatedKey

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/pigeon_hole/typed_json.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key) ⇒ DuplicatedKey

Returns a new instance of DuplicatedKey.



33
34
35
36
37
# File 'lib/pigeon_hole/typed_json.rb', line 33

def initialize(key)
  @key = key

  super("Hash has a duplicated key=#{key}")
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



31
32
33
# File 'lib/pigeon_hole/typed_json.rb', line 31

def key
  @key
end