Module: Craig::Node::Id

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

Instance Method Summary collapse

Instance Method Details

#idString

The unique ID of the listing.

Returns:

  • (String)


58
59
60
# File 'lib/craig/node.rb', line 58

def id
  dom.at_css("a")[:href][/\d+(?=\.html)/].to_i
end