Sha256: e6cbadeb7537349a9c446d067efdb102c60fb7e14137f1cd7928be6346d3ed54

Contents?: true

Size: 654 Bytes

Versions: 6

Compression:

Stored size: 654 Bytes

Contents

module Precious
  module Views
    class Page < Layout
      attr_reader :content, :page, :footer

      def title
        @page.title
      end

      def format
        @page.format.to_s
      end

      def author
        @page.version.author.name
      end

      def date
        @page.version.authored_date.strftime("%Y-%m-%d %H:%M:%S")
      end

      def has_footer
        @footer ||= @page.footer
        !@footer.nil?
      end

      def footer_content
        @footer ||= @page.footer
        @footer.formatted_data
      end

      def footer_format
        @footer ||= @page.footer
        @footer.format.to_s
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
gollum-1.1.1 lib/gollum/frontend/views/page.rb
gollum-1.1.0 lib/gollum/frontend/views/page.rb
tecnh-gollum-1.0.2.auth2 lib/gollum/frontend/views/page.rb
tecnh-gollum-1.0.2.auth lib/gollum/frontend/views/page.rb
gollum-1.0.1 lib/gollum/frontend/views/page.rb
gollum-1.0.0 lib/gollum/frontend/views/page.rb