Module: Craig::Node::Bedrooms
- Included in:
- Listing::Housing
- Defined in:
- lib/craig/node.rb
Instance Method Summary collapse
-
#bedrooms ⇒ Int
Number of bedrooms.
Instance Method Details
#bedrooms ⇒ Int
Returns number of bedrooms.
131 132 133 134 135 |
# File 'lib/craig/node.rb', line 131 def bedrooms node = dom.at_css(".itemph") return nil unless node node.text[/\d+(?=br)/].to_i end |