Module: Saxerator

Extended by:
Saxerator
Included in:
Saxerator
Defined in:
lib/saxerator.rb,
lib/saxerator/dsl.rb,
lib/saxerator/builder.rb,
lib/saxerator/version.rb,
lib/saxerator/adapters/ox.rb,
lib/saxerator/sax_handler.rb,
lib/saxerator/adapters/oga.rb,
lib/saxerator/configuration.rb,
lib/saxerator/full_document.rb,
lib/saxerator/adapters/rexml.rb,
lib/saxerator/latches/within.rb,
lib/saxerator/latches/at_depth.rb,
lib/saxerator/latches/child_of.rb,
lib/saxerator/latches/for_tags.rb,
lib/saxerator/adapters/nokogiri.rb,
lib/saxerator/document_fragment.rb,
lib/saxerator/parser/accumulator.rb,
lib/saxerator/builder/xml_builder.rb,
lib/saxerator/builder/hash_builder.rb,
lib/saxerator/builder/hash_element.rb,
lib/saxerator/builder/array_element.rb,
lib/saxerator/builder/string_element.rb,
lib/saxerator/latches/abstract_latch.rb,
lib/saxerator/latches/with_attributes.rb,
lib/saxerator/parser/latched_accumulator.rb

Defined Under Namespace

Modules: Adapters, Builder, DSL, Latches, Parser Classes: Configuration, DocumentFragment, FullDocument, ParseException, SaxHandler

Constant Summary collapse

VERSION =
'0.9.9'.freeze

Instance Method Summary collapse

Instance Method Details

#parser(xml) {|config| ... } ⇒ Object

Yields:

  • (config)


31
32
33
34
35
36
# File 'lib/saxerator.rb', line 31

def parser(xml)
  config = Configuration.new
  yield(config) if block_given?

  FullDocument.new(xml, config)
end