Class: SgPostcode::ResponseBuilder::Config
- Inherits:
-
Object
- Object
- SgPostcode::ResponseBuilder::Config
- Defined in:
- lib/sg_postcode/response/config.rb
Class Method Summary collapse
-
.add_key_path(key_name, *path) ⇒ Object
add a custom key_path.
-
.default_fields ⇒ Object
default fields (key_paths).
-
.fields ⇒ Object
Get all response fields (key_paths).
-
.remove_key_path(key_name) ⇒ Object
remove a key_path.
Class Method Details
.add_key_path(key_name, *path) ⇒ Object
add a custom key_path
11 12 13 |
# File 'lib/sg_postcode/response/config.rb', line 11 def add_key_path(key_name, *path) #TODO end |
.default_fields ⇒ Object
default fields (key_paths)
24 25 26 27 28 29 30 |
# File 'lib/sg_postcode/response/config.rb', line 24 def default_fields { format_address: ['formatted_address'], lat: ['geometry', 'location', 'lat'], long: ['geometry', 'location', 'lng'], } end |
.fields ⇒ Object
Get all response fields (key_paths)
6 7 8 |
# File 'lib/sg_postcode/response/config.rb', line 6 def fields @@fields ||= default_fields end |
.remove_key_path(key_name) ⇒ Object
remove a key_path
19 20 21 |
# File 'lib/sg_postcode/response/config.rb', line 19 def remove_key_path(key_name) #TODO end |