Module: Gemtext

Defined in:
lib/gemtext.rb,
lib/gemtext/link.rb,
lib/gemtext/node.rb,
lib/gemtext/text.rb,
lib/gemtext/quote.rb,
lib/gemtext/parser.rb,
lib/gemtext/heading.rb,
lib/gemtext/version.rb,
lib/gemtext/document.rb,
lib/gemtext/list_item.rb,
lib/gemtext/whitespace.rb,
lib/gemtext/sub_heading.rb,
lib/gemtext/preformatted.rb,
lib/gemtext/sub_sub_heading.rb

Defined Under Namespace

Classes: Document, Error, Heading, Link, ListItem, Node, Parser, Preformatted, Quote, SubHeading, SubSubHeading, Text, Whitespace

Constant Summary collapse

VERSION =
'1.0.3'

Class Method Summary collapse

Class Method Details

.parse(data) ⇒ Object



10
11
12
13
14
15
# File 'lib/gemtext.rb', line 10

def self.parse(data)
  io = data
  io = StringIO.new(data) if data.instance_of? String
  parser = Parser.new(io)
  parser.parse
end