Module: CocoaXML
- Defined in:
- lib/cocoa-xml.rb,
lib/cocoa-xml/nodeset.rb,
lib/cocoa-xml/version.rb,
lib/cocoa-xml/nsxmlnode_extras.rb,
lib/cocoa-xml/nsxmldocument_extras.rb
Defined Under Namespace
Modules: NSXMLDocumentExtras, NSXMLNodeExtras Classes: NodeSet
Constant Summary collapse
- Version =
'0.4.5'
Class Method Summary collapse
-
.HTML(source) ⇒ NSXMLDocument
Parse an input HTML source.
- .test_capture(&block) ⇒ Object
- .test_filter(&block) ⇒ Object
-
.XML(source) ⇒ NSXMLDocument
Parse an input XML source.
Class Method Details
.HTML(source) ⇒ NSXMLDocument
Parse an input HTML source
15 16 17 |
# File 'lib/cocoa-xml.rb', line 15 def self.HTML(source) parse source, :html end |
.test_capture(&block) ⇒ Object
32 33 34 |
# File 'lib/cocoa-xml.rb', line 32 def self.test_capture(&block) @@test_capture = lambda { |document, source, type| block.call(document, source, type) } end |
.test_filter(&block) ⇒ Object
28 29 30 |
# File 'lib/cocoa-xml.rb', line 28 def self.test_filter(&block) @@test_filter = lambda { |source, type| block.call(source, type) } end |
.XML(source) ⇒ NSXMLDocument
Parse an input XML source
24 25 26 |
# File 'lib/cocoa-xml.rb', line 24 def self.XML(source) parse source, :xml end |