Class: Decidim::Map::Utility Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/decidim/map/utility.rb

Overview

This class is abstract.

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

Direct Known Subclasses

Frontend, Geocoding, StaticMap

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(organization:, config:, locale: I18n.locale.to_s) ⇒ Utility

Initializes the map utility.

Parameters:

  • options (Hash)

    The options for the map utility



20
21
22
23
24
# File 'lib/decidim/map/utility.rb', line 20

def initialize(organization:, config:, locale: I18n.locale.to_s)
  @organization = organization
  @locale = locale
  configure!(config)
end

Instance Attribute Details

#configurationObject (readonly)

Returns the value of attribute configuration.



10
11
12
# File 'lib/decidim/map/utility.rb', line 10

def configuration
  @configuration
end

#localeObject (readonly)

Returns the value of attribute locale.



10
11
12
# File 'lib/decidim/map/utility.rb', line 10

def locale
  @locale
end

#organizationObject (readonly)

Returns the value of attribute organization.



10
11
12
# File 'lib/decidim/map/utility.rb', line 10

def organization
  @organization
end