Top Level Namespace
Defined Under Namespace
Classes: Array, File, Hash, Patterns_all, Patterns_any, String, Symbol, XML, XML_Comment, XML_PI
Instance Method Summary collapse
- #all(*patterns) ⇒ Object
- #any(*patterns) ⇒ Object
-
#xml(*args, &blk) ⇒ Object
Syntactic sugar for XML.new.
-
#xml!(*args, &blk) ⇒ Object
xml! in XML { … } - context adds node to parent xml! in main context prints the argument (and returns it anyway).
Instance Method Details
#all(*patterns) ⇒ Object
1378 1379 1380 |
# File 'lib/magic_xml.rb', line 1378 def all(*patterns) Patterns_all.new(*patterns) end |
#any(*patterns) ⇒ Object
1399 1400 1401 |
# File 'lib/magic_xml.rb', line 1399 def any(*patterns) Patterns_any.new(*patterns) end |
#xml(*args, &blk) ⇒ Object
Syntactic sugar for XML.new
1349 1350 1351 |
# File 'lib/magic_xml.rb', line 1349 def xml(*args, &blk) XML.new(*args, &blk) end |
#xml!(*args, &blk) ⇒ Object
xml! in XML { … } - context adds node to parent xml! in main context prints the argument (and returns it anyway)
1355 1356 1357 1358 1359 |
# File 'lib/magic_xml.rb', line 1355 def xml!(*args, &blk) node = xml(*args, &blk) print node node end |