Module: Craig::Node::Location

Included in:
Listing::Base
Defined in:
lib/craig/node.rb

Instance Method Summary collapse

Instance Method Details

#locationString

Returns:

  • (String)


30
31
32
33
34
35
# File 'lib/craig/node.rb', line 30

def location
  node = dom.at_css(".itempn")
  return "" unless node
  text = node.text.strip[1..-2].to_s
  text ? text.strip : text
end