Class: Geostats::Grabber::Log
- Inherits:
-
Object
- Object
- Geostats::Grabber::Log
- Defined in:
- lib/geostats/grabber/log.rb
Instance Method Summary collapse
- #icon ⇒ Object
-
#initialize(uuid) ⇒ Log
constructor
A new instance of Log.
- #logged_at ⇒ Object
- #message ⇒ Object
Constructor Details
#initialize(uuid) ⇒ Log
4 5 6 |
# File 'lib/geostats/grabber/log.rb', line 4 def initialize(uuid) @resp, @data = HTTP.get("/seek/log.aspx?LUID=#{uuid}") end |
Instance Method Details
#icon ⇒ Object
8 9 10 11 12 |
# File 'lib/geostats/grabber/log.rb', line 8 def icon if @data =~ /<img id="ctl00_ContentBody_LogBookPanel1_LogImage".*?src="\/images\/icons\/(.*?).gif" .*? \/>/ $1 end end |
#logged_at ⇒ Object
20 21 22 23 24 |
# File 'lib/geostats/grabber/log.rb', line 20 def logged_at if @data =~ /<span id="ctl00_ContentBody_LogBookPanel1_LogDate">(.*?)<\/span>/ Time.parse($1) rescue nil end end |
#message ⇒ Object
14 15 16 17 18 |
# File 'lib/geostats/grabber/log.rb', line 14 def if @data =~ /<p><span id="ctl00_ContentBody_LogBookPanel1_LogText">(.*)<\/span><\/p>/ Utils.(Utils.unescape($1)) end end |