Class: I18nFlow::Validator::MissingKeyError

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) ⇒ MissingKeyError

Returns a new instance of MissingKeyError.



43
44
45
46
# File 'lib/i18n_flow/validator/errors.rb', line 43

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

Instance Attribute Details

#dest_keyObject (readonly)

Returns the value of attribute dest_key.



40
41
42
# File 'lib/i18n_flow/validator/errors.rb', line 40

def dest_key
  @dest_key
end

#dest_nodeObject (readonly)

Returns the value of attribute dest_node.



39
40
41
# File 'lib/i18n_flow/validator/errors.rb', line 39

def dest_node
  @dest_node
end

#src_nodeObject (readonly)

Returns the value of attribute src_node.



41
42
43
# File 'lib/i18n_flow/validator/errors.rb', line 41

def src_node
  @src_node
end

Instance Method Details

#set_correction_context(dest_node:, dest_key:, src_node:) ⇒ Object



48
49
50
51
# File 'lib/i18n_flow/validator/errors.rb', line 48

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