Class: I18nFlow::Validator::InvalidLocaleError

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

#==, #set_location, #single?

Constructor Details

#initialize(key, expect:, actual:) ⇒ InvalidLocaleError

Returns a new instance of InvalidLocaleError.



74
75
76
77
78
# File 'lib/i18n_flow/validator/errors.rb', line 74

def initialize(key, expect:, actual:)
  super(key)
  @expect = expect
  @actual = actual
end

Instance Attribute Details

#actualObject (readonly)

Returns the value of attribute actual.



72
73
74
# File 'lib/i18n_flow/validator/errors.rb', line 72

def actual
  @actual
end

#expectObject (readonly)

Returns the value of attribute expect.



71
72
73
# File 'lib/i18n_flow/validator/errors.rb', line 71

def expect
  @expect
end

Instance Method Details

#dataObject



80
81
82
# File 'lib/i18n_flow/validator/errors.rb', line 80

def data
  super + [expect, actual]
end