Method: Atom::Content::Html#initialize
- Defined in:
- lib/atom.rb
#initialize(o) ⇒ Html
Creates a new Content::Html.
o-
An XML::Reader or a HTML string.
225 226 227 228 229 230 231 232 233 234 |
# File 'lib/atom.rb', line 225 def initialize(o) case o when XML::Reader super(o.read_string.gsub(/\s+/, ' ').strip) parse(o, :once => true) when String super(o) @type = 'html' end end |