class Juggalo::Page::Loader::YAML

Public Class Methods

new(location) click to toggle source
# File lib/juggalo/page/loader/yaml.rb, line 9
def initialize(location)
  @location = location
end

Public Instance Methods

components() click to toggle source
# File lib/juggalo/page/loader/yaml.rb, line 13
def components
  page_hash["components"].map { |c| create_component_from c }
end

Private Instance Methods

page_hash() click to toggle source
# File lib/juggalo/page/loader/yaml.rb, line 19
def page_hash
  ::YAML::load(File.open(@location))
end