Class: Geostats::Grabber::User

Inherits:
Object
  • Object
show all
Defined in:
lib/geostats/grabber/user.rb

Instance Method Summary collapse

Constructor Details

#initialize(uuid) ⇒ User

Returns a new instance of User.



4
5
6
# File 'lib/geostats/grabber/user.rb', line 4

def initialize(uuid)
  @resp, @data = HTTP.get("/profile/?guid=#{uuid}")
end

Instance Method Details

#usernameObject



8
9
10
11
12
# File 'lib/geostats/grabber/user.rb', line 8

def username
  if @data =~ /<h2><span id="ctl00_ContentBody_lblUserProfile".*?>Profile for User: (.*?)<\/span><\/h2>/
    Utils.unescape($1)
  end
end