Class: Fias::Query::Params
- Inherits:
-
Object
- Object
- Fias::Query::Params
- Defined in:
- lib/fias/query/params.rb
Constant Summary collapse
- KEYS =
%i(street subcity city district region)
Instance Attribute Summary collapse
-
#forms ⇒ Object
readonly
Returns the value of attribute forms.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#sanitized ⇒ Object
readonly
Returns the value of attribute sanitized.
-
#split ⇒ Object
readonly
Returns the value of attribute split.
-
#synonyms ⇒ Object
readonly
Returns the value of attribute synonyms.
Instance Method Summary collapse
-
#initialize(params) ⇒ Params
constructor
A new instance of Params.
Constructor Details
#initialize(params) ⇒ Params
Returns a new instance of Params.
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/fias/query/params.rb', line 6 def initialize(params) @params = params @params.assert_valid_keys(*KEYS) extract_names remove_duplicates move_federal_city_to_correct_place strip_house_number sort extract_synonyms split_sanitized fill_forms end |
Instance Attribute Details
#forms ⇒ Object (readonly)
Returns the value of attribute forms.
20 21 22 |
# File 'lib/fias/query/params.rb', line 20 def forms @forms end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
20 21 22 |
# File 'lib/fias/query/params.rb', line 20 def params @params end |
#sanitized ⇒ Object (readonly)
Returns the value of attribute sanitized.
20 21 22 |
# File 'lib/fias/query/params.rb', line 20 def sanitized @sanitized end |
#split ⇒ Object (readonly)
Returns the value of attribute split.
20 21 22 |
# File 'lib/fias/query/params.rb', line 20 def split @split end |
#synonyms ⇒ Object (readonly)
Returns the value of attribute synonyms.
20 21 22 |
# File 'lib/fias/query/params.rb', line 20 def synonyms @synonyms end |