Class: AtlasEngine::AddressValidation::Field

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
app/models/atlas_engine/address_validation/field.rb

Constant Summary collapse

Name =
T.type_alias { T.any(String, Symbol) }
Value =
T.type_alias { T.nilable(String) }

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, value:) ⇒ Field

Returns a new instance of Field.



19
20
21
22
# File 'app/models/atlas_engine/address_validation/field.rb', line 19

def initialize(name:, value:)
  @name = name
  @value = value
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



13
14
15
# File 'app/models/atlas_engine/address_validation/field.rb', line 13

def name
  @name
end

#valueObject (readonly)

Returns the value of attribute value.



16
17
18
# File 'app/models/atlas_engine/address_validation/field.rb', line 16

def value
  @value
end

Instance Method Details

#attributesObject



25
26
27
# File 'app/models/atlas_engine/address_validation/field.rb', line 25

def attributes
  { name: name, value: value }
end