Module: Googletastic::Mixins::Parsing::InstanceMethods

Defined in:
lib/googletastic/mixins/parsing.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cache_parsedObject

cached nokogiri xml, false by default



49
50
51
# File 'lib/googletastic/mixins/parsing.rb', line 49

def cache_parsed
  @cache_parsed
end

#cache_resultObject

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

Returns:

  • (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

Returns:

  • (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