Class: SmartyStreets::USAutocomplete::Suggestion
- Inherits:
-
Object
- Object
- SmartyStreets::USAutocomplete::Suggestion
- Defined in:
- lib/smartystreets_ruby_sdk/us_autocomplete/suggestion.rb
Overview
Instance Attribute Summary collapse
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#street_line ⇒ Object
readonly
Returns the value of attribute street_line.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(obj) ⇒ Suggestion
constructor
A new instance of Suggestion.
Constructor Details
#initialize(obj) ⇒ Suggestion
Returns a new instance of Suggestion.
8 9 10 11 12 13 |
# File 'lib/smartystreets_ruby_sdk/us_autocomplete/suggestion.rb', line 8 def initialize(obj) @text = obj.fetch('text', nil) @street_line = obj.fetch('street_line', nil) @city = obj.fetch('city', nil) @state = obj.fetch('state', nil) end |
Instance Attribute Details
#city ⇒ Object (readonly)
Returns the value of attribute city.
6 7 8 |
# File 'lib/smartystreets_ruby_sdk/us_autocomplete/suggestion.rb', line 6 def city @city end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
6 7 8 |
# File 'lib/smartystreets_ruby_sdk/us_autocomplete/suggestion.rb', line 6 def state @state end |
#street_line ⇒ Object (readonly)
Returns the value of attribute street_line.
6 7 8 |
# File 'lib/smartystreets_ruby_sdk/us_autocomplete/suggestion.rb', line 6 def street_line @street_line end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
6 7 8 |
# File 'lib/smartystreets_ruby_sdk/us_autocomplete/suggestion.rb', line 6 def text @text end |