Class: Promethee::Data::MasterLocalized

Inherits:
Promethee::Data show all
Defined in:
lib/promethee/data/master_localized.rb

Overview

Injects localization data into master data, so the page can be showed in the correct localization

Instance Method Summary collapse

Methods inherited from Promethee::Data

#[], #data, #include?, #to_json

Constructor Details

#initialize(master, localization = nil) ⇒ MasterLocalized

Returns a new instance of MasterLocalized.



3
4
5
6
7
8
9
# File 'lib/promethee/data/master_localized.rb', line 3

def initialize(master, localization = nil)
  @data = hashify master
  if localization
    @localization = Localization.new localization
    localize_component @data
  end
end