Class: Decidim::Map::Provider::Autocomplete::Test
- Inherits:
-
Autocomplete
- Object
- Utility
- Frontend
- Autocomplete
- Decidim::Map::Provider::Autocomplete::Test
- Defined in:
- decidim-dev/lib/decidim/dev/test/rspec_support/geocoder.rb
Defined Under Namespace
Classes: Builder
Instance Attribute Summary
Attributes inherited from Utility
#configuration, #locale, #organization
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Frontend
#builder_class, #create_builder
Methods inherited from Utility
Constructor Details
This class inherits a constructor from Decidim::Map::Utility
Class Method Details
.add_stub(address, coordinates) ⇒ Object
49 50 51 52 53 54 |
# File 'decidim-dev/lib/decidim/dev/test/rspec_support/geocoder.rb', line 49 def self.add_stub(address, coordinates) stubs.push( properties: address.is_a?(Hash) ? address : { street: address }, geometry: { coordinates: coordinates.reverse } ) end |
.clear_stubs ⇒ Object
56 57 58 |
# File 'decidim-dev/lib/decidim/dev/test/rspec_support/geocoder.rb', line 56 def self.clear_stubs @stubs = [] end |
.stubs ⇒ Object
45 46 47 |
# File 'decidim-dev/lib/decidim/dev/test/rspec_support/geocoder.rb', line 45 def self.stubs @stubs ||= [] end |
Instance Method Details
#builder_options ⇒ Object
60 61 62 |
# File 'decidim-dev/lib/decidim/dev/test/rspec_support/geocoder.rb', line 60 def { url: configuration.fetch(:url, nil) }.compact end |