Module: HTTP::ActAsNokogiriDocument
- Defined in:
- lib/http/acts_as_nokogiri_document.rb
Overview
Module to mix into ‘HTTP::Response` to make it act like a Nokogiri doc
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
9 10 11 |
# File 'lib/http/acts_as_nokogiri_document.rb', line 9 def method_missing(method, *args, &block) document.send(method, *args, &block) end |
Instance Method Details
#document ⇒ Object
4 5 6 7 |
# File 'lib/http/acts_as_nokogiri_document.rb', line 4 def document return @document if defined?(@document) @document = parse(content_type.mime_type) end |