Class: I18nFlow::Validator::ExtraKeyError

Inherits:
Error
  • Object
show all
Defined in:
lib/i18n_flow/validator/errors.rb

Instance Attribute Summary collapse

Attributes inherited from Error

#file, #key, #line

Instance Method Summary collapse

Methods inherited from Error

#==, #data, #set_location, #single?

Constructor Details

#initialize(key, single: false) ⇒ ExtraKeyError

Returns a new instance of ExtraKeyError.



58
59
60
61
# File 'lib/i18n_flow/validator/errors.rb', line 58

def initialize(key, single: false)
  super(key)
  @single = single
end

Instance Attribute Details

#dest_keyObject (readonly)

Returns the value of attribute dest_key.



56
57
58
# File 'lib/i18n_flow/validator/errors.rb', line 56

def dest_key
  @dest_key
end

#dest_nodeObject (readonly)

Returns the value of attribute dest_node.



55
56
57
# File 'lib/i18n_flow/validator/errors.rb', line 55

def dest_node
  @dest_node
end

Instance Method Details

#set_correction_context(dest_node:, dest_key:) ⇒ Object



63
64
65
66
# File 'lib/i18n_flow/validator/errors.rb', line 63

def set_correction_context(dest_node:, dest_key:)
  @dest_node, @dest_key = dest_node, dest_key
  self
end