Module: Craig::Node::Age
- Included in:
- Listing::Personals
- Defined in:
- lib/craig/node.rb
Instance Method Summary collapse
-
#age ⇒ Int
The poster’s age.
Instance Method Details
#age ⇒ Int
The poster’s age. Coerced to 0 if it is missing so that listings can be sorted.
77 78 79 |
# File 'lib/craig/node.rb', line 77 def age dom.at_css("a").text[/- (\d+)$/, 1].to_i end |