Class: Postio::Models::AddressSearchResult
- Inherits:
-
Data
- Object
- Data
- Postio::Models::AddressSearchResult
- Defined in:
- lib/postio/models.rb
Overview
AddressSearchResult — a single typeahead hit.
Instance Attribute Summary collapse
-
#suggestion ⇒ Object
readonly
Returns the value of attribute suggestion.
-
#udprn ⇒ Object
readonly
Returns the value of attribute udprn.
Class Method Summary collapse
Instance Attribute Details
#suggestion ⇒ Object (readonly)
Returns the value of attribute suggestion
34 35 36 |
# File 'lib/postio/models.rb', line 34 def suggestion @suggestion end |
#udprn ⇒ Object (readonly)
Returns the value of attribute udprn
34 35 36 |
# File 'lib/postio/models.rb', line 34 def udprn @udprn end |
Class Method Details
.from_hash(h) ⇒ Object
35 36 37 |
# File 'lib/postio/models.rb', line 35 def self.from_hash(h) new(udprn: h["udprn"].to_i, suggestion: h["suggestion"].to_s) end |