Class: I18nFlow::Validator::Symmetry
- Inherits:
-
Object
- Object
- I18nFlow::Validator::Symmetry
- Defined in:
- lib/i18n_flow/validator/symmetry.rb
Instance Attribute Summary collapse
-
#ast_1 ⇒ Object
readonly
Returns the value of attribute ast_1.
-
#ast_2 ⇒ Object
readonly
Returns the value of attribute ast_2.
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(ast_1, ast_2) ⇒ Symmetry
constructor
A new instance of Symmetry.
- #validate! ⇒ Object
Constructor Details
#initialize(ast_1, ast_2) ⇒ Symmetry
Returns a new instance of Symmetry.
9 10 11 12 |
# File 'lib/i18n_flow/validator/symmetry.rb', line 9 def initialize(ast_1, ast_2) @ast_1 = ast_1 @ast_2 = ast_2 end |
Instance Attribute Details
#ast_1 ⇒ Object (readonly)
Returns the value of attribute ast_1.
6 7 8 |
# File 'lib/i18n_flow/validator/symmetry.rb', line 6 def ast_1 @ast_1 end |
#ast_2 ⇒ Object (readonly)
Returns the value of attribute ast_2.
7 8 9 |
# File 'lib/i18n_flow/validator/symmetry.rb', line 7 def ast_2 @ast_2 end |
Instance Method Details
#errors ⇒ Object
19 20 21 |
# File 'lib/i18n_flow/validator/symmetry.rb', line 19 def errors @errors ||= [] end |
#validate! ⇒ Object
14 15 16 17 |
# File 'lib/i18n_flow/validator/symmetry.rb', line 14 def validate! @errors = nil validate_content(ast_1, ast_2) end |