Sha256: f179044c40073e02ce6deaa79b53d3b70baf112068e77e224b69f1f61c2781da

Contents?: true

Size: 483 Bytes

Versions: 4

Compression:

Stored size: 483 Bytes

Contents

module Protozoa
  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.new? ? "No Author" : @page.author
      end

      def date
        @page.new? ? DateTime.now.strftime("%Y-%m-%d %H:%M:%S") : @page.pubdate.strftime("%Y-%m-%d %H:%M:%S")
      end
      
      def editable
        @editable
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
amiba-1.0.2 lib/amiba/frontend/views/page.rb
amiba-1.0.1 lib/amiba/frontend/views/page.rb
amiba-1.0.0 lib/amiba/frontend/views/page.rb
amiba-0.0.9 lib/amiba/frontend/views/page.rb