Module: Craig::Node::Price
- Included in:
- Listing::ForSale, Listing::Housing
- Defined in:
- lib/craig/node.rb
Instance Method Summary collapse
-
#price ⇒ Int
Price coerced to 0 if missing.
Instance Method Details
#price ⇒ Int
Price coerced to 0 if missing.
142 143 144 145 146 147 148 |
# File 'lib/craig/node.rb', line 142 def price dom.elements .reverse .map(&:text) .join("")[/(\$)(\d+)/, 2] .to_i end |