Class: I18nFlow::Validator::Symmetry

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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_1Object (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_2Object (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

#errorsObject



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