Class: I18nFlow::Validator::TodoContentError
- Defined in:
- lib/i18n_flow/validator/errors.rb
Instance Attribute Summary collapse
-
#actual ⇒ Object
readonly
Returns the value of attribute actual.
-
#dest_node ⇒ Object
readonly
Returns the value of attribute dest_node.
-
#expect ⇒ Object
readonly
Returns the value of attribute expect.
-
#inverse ⇒ Object
readonly
Returns the value of attribute inverse.
-
#src_node ⇒ Object
readonly
Returns the value of attribute src_node.
Attributes inherited from Error
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(key, expect:, actual:, inverse:) ⇒ TodoContentError
constructor
A new instance of TodoContentError.
- #set_correction_context(dest_node:, src_node:) ⇒ Object
Methods inherited from Error
Constructor Details
#initialize(key, expect:, actual:, inverse:) ⇒ TodoContentError
Returns a new instance of TodoContentError.
79 80 81 82 83 84 |
# File 'lib/i18n_flow/validator/errors.rb', line 79 def initialize(key, expect:, actual:, inverse:) super(key) @expect = expect @actual = actual @inverse = inverse end |
Instance Attribute Details
#actual ⇒ Object (readonly)
Returns the value of attribute actual.
74 75 76 |
# File 'lib/i18n_flow/validator/errors.rb', line 74 def actual @actual end |
#dest_node ⇒ Object (readonly)
Returns the value of attribute dest_node.
75 76 77 |
# File 'lib/i18n_flow/validator/errors.rb', line 75 def dest_node @dest_node end |
#expect ⇒ Object (readonly)
Returns the value of attribute expect.
73 74 75 |
# File 'lib/i18n_flow/validator/errors.rb', line 73 def expect @expect end |
#inverse ⇒ Object (readonly)
Returns the value of attribute inverse.
77 78 79 |
# File 'lib/i18n_flow/validator/errors.rb', line 77 def inverse @inverse end |
#src_node ⇒ Object (readonly)
Returns the value of attribute src_node.
76 77 78 |
# File 'lib/i18n_flow/validator/errors.rb', line 76 def src_node @src_node end |
Instance Method Details
#data ⇒ Object
86 87 88 |
# File 'lib/i18n_flow/validator/errors.rb', line 86 def data super + [expect, actual] end |
#set_correction_context(dest_node:, src_node:) ⇒ Object
90 91 92 93 |
# File 'lib/i18n_flow/validator/errors.rb', line 90 def set_correction_context(dest_node:, src_node:) @dest_node, @src_node = dest_node, src_node self end |