Sha256: be5fb9aa4c905863d9ff241f9fdb0616530a97201dbcdc9a280ec3835ebb2078

Contents?: true

Size: 592 Bytes

Versions: 3

Compression:

Stored size: 592 Bytes

Contents

module Caramelize
  class Page
  
    attr_accessor :title, :body, :id, :syntax, :latest, :time, :message, :author, :author_name
  
    def initialize page={}
      @id =      page[:id]
      @title =   page[:title]
      @body =    page[:body]
      @syntax =  page[:syntax]
      @latest =  page[:latest]
      @time =    page[:time]
      @message = page[:message]
      @author =  page[:author]
      @author_name =  page[:author_name]
    end
    
    def latest?
      @latest
    end
    
    def set_latest
      @latest = true
    end
    
    def to_s
      @title
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
caramelize-0.0.3 lib/caramelize/page.rb
caramelize-0.0.2 lib/caramelize/page.rb
caramelize-0.0.1 lib/caramelize/page.rb