Class: TomlRB::ValueOverwriteError

Inherits:
Error
  • Object
show all
Defined in:
lib/toml-rb/errors.rb

Overview

Overwrite error

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key) ⇒ ValueOverwriteError

Returns a new instance of ValueOverwriteError.



12
13
14
15
# File 'lib/toml-rb/errors.rb', line 12

def initialize(key)
  @key = key
  super "Key #{key.inspect} is defined more than once"
end

Instance Attribute Details

#keyObject

Returns the value of attribute key.



10
11
12
# File 'lib/toml-rb/errors.rb', line 10

def key
  @key
end