Sha256: f14af23d6132691c40f90be212b3b46f32567359f24367eca8704408aa9754b7
Contents?: true
Size: 638 Bytes
Versions: 19
Compression:
Stored size: 638 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, offset: 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