Sha256: 444c0674adee058145d0441c3e3e20f0425406215c390620c8cf95c021816415
Contents?: true
Size: 630 Bytes
Versions: 19
Compression:
Stored size: 630 Bytes
Contents
module Nwiki module Core class Page attr_reader :title, :doc def initialize title, doc, parser_class raise 'title is empty or nil' unless title raise 'doc is empty or nil' unless doc raise 'parser_class is empty or nil' unless parser_class @title, @doc, @parser_class = title, doc, parser_class end def encoding @doc.encoding end def to_html @parser_class.new(@doc, 1).to_html end def == other return false unless other self.kind_of?(other.class) && self.doc == other.doc end end end end
Version data entries
19 entries across 19 versions & 1 rubygems