Class: I18nFlow::Validator::AsymmetricArgsError

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:) ⇒ AsymmetricArgsError

Returns a new instance of AsymmetricArgsError.



115
116
117
118
119
# File 'lib/i18n_flow/validator/errors.rb', line 115

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

Instance Attribute Details

#actualObject (readonly)

Returns the value of attribute actual.



113
114
115
# File 'lib/i18n_flow/validator/errors.rb', line 113

def actual
  @actual
end

#expectObject (readonly)

Returns the value of attribute expect.



112
113
114
# File 'lib/i18n_flow/validator/errors.rb', line 112

def expect
  @expect
end

Instance Method Details

#dataObject



121
122
123
# File 'lib/i18n_flow/validator/errors.rb', line 121

def data
  super + [expect, actual]
end