Sha256: 4d56421f9152c3172253796a32c928b829c26e7429857424a9a30948064965f1

Contents?: true

Size: 410 Bytes

Versions: 1

Compression:

Stored size: 410 Bytes

Contents

require 'yaml'
require 'juggalo/page'
require 'juggalo/page/loader/base'

module Juggalo
  class Page::Loader
    class YAML < Base
      def initialize(location)
        @location = location
      end

      def components
        page_hash["components"].map { |c| Juggalo::Portlet.new(c) }
      end

      private

      def page_hash
        ::YAML::load(File.open(@location))
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
juggalo-0.0.1 lib/juggalo/page/loader/yaml.rb