Sha256: 57bff81c549d33ba8a70601593fc8721a8638ae86224fc295e153fdc523cd281

Contents?: true

Size: 416 Bytes

Versions: 5

Compression:

Stored size: 416 Bytes

Contents

# encoding: UTF-8

module Spontaneous::Plugins::Site
  module Map
    extend ActiveSupport::Concern

    module ClassMethods
      def map(root_id=nil)
        page = \
          if root_id.nil?
            Spontaneous::Page.root
          else
            Spontaneous::Content.first :id => root_id
          end
        return nil unless page
        page.map_entry
      end
    end # ClassMethods
  end # Map
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
spontaneous-0.2.0.alpha7 lib/spontaneous/plugins/site/map.rb
spontaneous-0.2.0.alpha6 lib/spontaneous/plugins/site/map.rb
spontaneous-0.2.0.alpha5 lib/spontaneous/plugins/site/map.rb
spontaneous-0.2.0.alpha4 lib/spontaneous/plugins/site/map.rb
spontaneous-0.2.0.alpha3 lib/spontaneous/plugins/site/map.rb