Module: Hpple
- Defined in:
- lib/motion-hpple/hpple.rb,
lib/motion-hpple/version.rb
Constant Summary collapse
- VERSION =
'0.3.1'
Class Method Summary collapse
- .HTML(html, encoding = NSUTF8StringEncoding) ⇒ Object
- .XML(xml, encoding = NSUTF8StringEncoding) ⇒ Object
Class Method Details
.HTML(html, encoding = NSUTF8StringEncoding) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/motion-hpple/hpple.rb', line 11 def HTML(html, encoding=NSUTF8StringEncoding) if html.is_a?(NSString) html = html.dataUsingEncoding(encoding) end TFHpple.hppleWithHTMLData(html) end |
.XML(xml, encoding = NSUTF8StringEncoding) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/motion-hpple/hpple.rb', line 4 def XML(xml, encoding=NSUTF8StringEncoding) if xml.is_a?(NSString) xml = xml.dataUsingEncoding(encoding) end TFHpple.hppleWithXMLData(xml) end |