Module: Googletastic::Mixins::Parsing::ClassMethods

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



19
20
21
# File 'lib/googletastic/mixins/parsing.rb', line 19

def cache_parsed
  @cache_parsed
end

#cache_resultObject

cache xml as string?



26
27
28
# File 'lib/googletastic/mixins/parsing.rb', line 26

def cache_result
  @cache_result
end

Instance Method Details

#cache_parsed?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/googletastic/mixins/parsing.rb', line 21

def cache_parsed?
  @cache_parsed == true
end

#cache_result?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/googletastic/mixins/parsing.rb', line 28

def cache_result?
  @cache_result == true
end

#marshall(records) ⇒ Object

implement in subclasses



42
43
44
# File 'lib/googletastic/mixins/parsing.rb', line 42

def marshall(records)
  raise "Implemnent in subclasses"
end

#unmarshall(xml_records) ⇒ Object

implement in subclasses



37
38
39
# File 'lib/googletastic/mixins/parsing.rb', line 37

def unmarshall(xml_records)
  raise "Implemnent in subclasses"
end

#unmarshall_head(xml) ⇒ Object



32
33
34
# File 'lib/googletastic/mixins/parsing.rb', line 32

def unmarshall_head(xml)
  Googletastic::Head.unmarshall(xml)
end