Module: Googletastic::Mixins::Parsing::InstanceMethods
- Defined in:
- lib/googletastic/mixins/parsing.rb
Instance Attribute Summary collapse
-
#cache_parsed ⇒ Object
cached nokogiri xml, false by default.
-
#cache_result ⇒ Object
cache xml as string?.
Instance Method Summary collapse
- #after_parse(parsed) ⇒ Object
- #cache_parsed? ⇒ Boolean
- #cache_result? ⇒ Boolean
- #from_xml(xml) ⇒ Object
Instance Attribute Details
#cache_parsed ⇒ Object
cached nokogiri xml, false by default
49 50 51 |
# File 'lib/googletastic/mixins/parsing.rb', line 49 def cache_parsed @cache_parsed end |
#cache_result ⇒ Object
cache xml as string?
56 57 58 |
# File 'lib/googletastic/mixins/parsing.rb', line 56 def cache_result @cache_result end |
Instance Method Details
#after_parse(parsed) ⇒ Object
66 67 68 |
# File 'lib/googletastic/mixins/parsing.rb', line 66 def after_parse(parsed) end |
#cache_parsed? ⇒ Boolean
51 52 53 |
# File 'lib/googletastic/mixins/parsing.rb', line 51 def cache_parsed? @cache_parsed != false || self.class.cache_result? end |
#cache_result? ⇒ Boolean
58 59 60 |
# File 'lib/googletastic/mixins/parsing.rb', line 58 def cache_result? @cache_result != false || self.class.cache_result? end |
#from_xml(xml) ⇒ Object
62 63 64 |
# File 'lib/googletastic/mixins/parsing.rb', line 62 def from_xml(xml) self.class.unmarshall(xml) end |