Class: Shb::Parser
- Inherits:
-
HTTParty::Parser
- Object
- HTTParty::Parser
- Shb::Parser
- Defined in:
- lib/shb/parser.rb
Instance Method Summary collapse
Instance Method Details
#html ⇒ Object
13 14 15 |
# File 'lib/shb/parser.rb', line 13 def html Nokogiri::HTML(body) end |
#json ⇒ Object
21 22 23 24 25 |
# File 'lib/shb/parser.rb', line 21 def json JSON.parse(body) rescue JSON::ParserError nil end |
#xml ⇒ Object
17 18 19 |
# File 'lib/shb/parser.rb', line 17 def xml Nokogiri::XML(body) end |