Class: Juggalo::Page::Loader::YAML

Inherits:
Base
  • Object
show all
Defined in:
lib/juggalo/page/loader/yaml.rb

Instance Method Summary collapse

Methods inherited from Base

#create_component_from

Constructor Details

#initialize(location) ⇒ YAML

Returns a new instance of YAML.



9
10
11
# File 'lib/juggalo/page/loader/yaml.rb', line 9

def initialize(location)
  @location = location
end

Instance Method Details

#componentsObject



13
14
15
# File 'lib/juggalo/page/loader/yaml.rb', line 13

def components
  page_hash["components"].map { |c| create_component_from c }
end