class Decidim::Map::Utility

Generic map utility that will be used for providing different map functionality to the application.

@abstract

Attributes

configuration[R]
locale[R]
organization[R]

Public Class Methods

new(organization:, config:, locale: I18n.locale.to_s) click to toggle source

Initializes the map utility.

@param options [Hash] The options for the map utility @option options [Decidim::Organization] :organization The organization

where the map functionality is used

@option options [String] :config The configuration hash specific to the

utility

@option options [String] :locale The locale to use for the queries

# File lib/decidim/map/utility.rb, line 20
def initialize(organization:, config:, locale: I18n.locale.to_s)
  @organization = organization
  @locale = locale
  configure!(config)
end

Protected Instance Methods

configure!(config) click to toggle source

Sets the local configurations for the utility.

@param config [Hash] The whole configuration hash.

@return [Hash] The configuration hash.

# File lib/decidim/map/utility.rb, line 33
def configure!(config)
  @configuration = config
end