Module: Craig::Node::SquareFeet

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

Instance Method Summary collapse

Instance Method Details

#square_feetInt

Returns area.

Returns:

  • (Int)

    area



122
123
124
125
126
# File 'lib/craig/node.rb', line 122

def square_feet
  node = dom.at_css(".itemph")
  return nil unless node
  node.text[/\d+(?=ft)/].to_i
end