Class: Decidim::Map::Frontend
- Defined in:
- lib/decidim/map/frontend.rb
Overview
A base class for front-end mapping functionality, common to all front-end map services, such as dynamic_map.rb and autocomplete.rb. Provides builder classes for the front-end.
Direct Known Subclasses
Defined Under Namespace
Classes: Builder
Instance Attribute Summary
Attributes inherited from Utility
#configuration, #locale, #organization
Instance Method Summary collapse
-
#builder_class ⇒ Class
Returns the builder class for the map.
-
#builder_options ⇒ Hash
Returns the default options for the builder object.
-
#create_builder(template, options = {}) ⇒ Decidim::Map::BuilderUtility::Builder
Creates a builder class for the front-end that is used to build the HTML markup related to this utility.
Methods inherited from Utility
Constructor Details
This class inherits a constructor from Decidim::Map::Utility
Instance Method Details
#builder_class ⇒ Class
Returns the builder class for the map. Allows fetching the class name dynamically also in the utility classes that extend this class.
24 25 26 |
# File 'lib/decidim/map/frontend.rb', line 24 def builder_class self.class.const_get(:Builder) end |
#builder_options ⇒ Hash
Returns the default options for the builder object.
31 32 33 |
# File 'lib/decidim/map/frontend.rb', line 31 def configuration end |
#create_builder(template, options = {}) ⇒ Decidim::Map::BuilderUtility::Builder
Creates a builder class for the front-end that is used to build the HTML markup related to this utility.
16 17 18 |
# File 'lib/decidim/map/frontend.rb', line 16 def create_builder(template, = {}) builder_class.new(template, .merge()) end |