Class: AtlasEngine::AddressValidation::Concern
- Inherits:
-
Object
- Object
- AtlasEngine::AddressValidation::Concern
- Extended by:
- T::Sig
- Defined in:
- app/models/atlas_engine/address_validation/concern.rb
Constant Summary collapse
- TYPES =
T.let( { warning: "warning", error: "error", }.freeze, T::Hash[Symbol, String], )
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#field_names ⇒ Object
readonly
Returns the value of attribute field_names.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#suggestion ⇒ Object
readonly
Returns the value of attribute suggestion.
-
#suggestion_ids ⇒ Object
readonly
Returns the value of attribute suggestion_ids.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#type_level ⇒ Object
readonly
Returns the value of attribute type_level.
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(code:, message:, type:, type_level:, suggestion_ids:, field_names:, suggestion: nil) ⇒ Concern
constructor
A new instance of Concern.
Constructor Details
#initialize(code:, message:, type:, type_level:, suggestion_ids:, field_names:, suggestion: nil) ⇒ Concern
Returns a new instance of Concern.
51 52 53 54 55 56 57 58 59 |
# File 'app/models/atlas_engine/address_validation/concern.rb', line 51 def initialize(code:, message:, type:, type_level:, suggestion_ids:, field_names:, suggestion: nil) @code = code @type = type @type_level = type_level @suggestion_ids = suggestion_ids @field_names = field_names @message = @suggestion = T.let(suggestion, T.nilable(Suggestion)) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
18 19 20 |
# File 'app/models/atlas_engine/address_validation/concern.rb', line 18 def code @code end |
#field_names ⇒ Object (readonly)
Returns the value of attribute field_names.
33 34 35 |
# File 'app/models/atlas_engine/address_validation/concern.rb', line 33 def field_names @field_names end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
21 22 23 |
# File 'app/models/atlas_engine/address_validation/concern.rb', line 21 def @message end |
#suggestion ⇒ Object (readonly)
Returns the value of attribute suggestion.
36 37 38 |
# File 'app/models/atlas_engine/address_validation/concern.rb', line 36 def suggestion @suggestion end |
#suggestion_ids ⇒ Object (readonly)
Returns the value of attribute suggestion_ids.
30 31 32 |
# File 'app/models/atlas_engine/address_validation/concern.rb', line 30 def suggestion_ids @suggestion_ids end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
24 25 26 |
# File 'app/models/atlas_engine/address_validation/concern.rb', line 24 def type @type end |
#type_level ⇒ Object (readonly)
Returns the value of attribute type_level.
27 28 29 |
# File 'app/models/atlas_engine/address_validation/concern.rb', line 27 def type_level @type_level end |
Instance Method Details
#attributes ⇒ Object
62 63 64 65 66 67 68 69 70 71 |
# File 'app/models/atlas_engine/address_validation/concern.rb', line 62 def attributes { field_names: field_names, message: , code: code, type: type, type_level: type_level, suggestion_ids: suggestion_ids, } end |