Sha256: 56e8847d9a0a39f877248c6db2ebb6e7a403c54d10003ba0d9a1f7a4b28b38bc

Contents?: true

Size: 445 Bytes

Versions: 1

Compression:

Stored size: 445 Bytes

Contents

module Orthor
  class Category < Orthor::Object
    include Orthor::Collections

    dsl_accessor :page_path, :page_template

    def initialize(path, options = {}, &blk)
      @feeds, @categories, @pages, @static_pages, @queries = [], [], [], [], []
      super path, options

      # categories can give blocks
      instance_eval &blk if block_given?
    end

    def fetch_content
      Orthorings.category(@id, @template)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
orthorings-0.4.0 lib/orthor/category.rb