Class: Geoblacklight::Configuration::LeafletLayersConfig

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Attributes, ActiveModel::Model
Defined in:
lib/geoblacklight/configuration/leaflet_layers_config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ LeafletLayersConfig

Returns a new instance of LeafletLayersConfig.



13
14
15
16
# File 'lib/geoblacklight/configuration/leaflet_layers_config.rb', line 13

def initialize(attributes = {})
  super
  self.index = attributes[:index]
end

Instance Attribute Details

#indexObject

Returns the value of attribute index.



11
12
13
# File 'lib/geoblacklight/configuration/leaflet_layers_config.rb', line 11

def index
  @index
end

Instance Method Details

#to_hObject



28
29
30
# File 'lib/geoblacklight/configuration/leaflet_layers_config.rb', line 28

def to_h
  attributes.merge({"index" => index.transform_values(&:to_h)})
end