Class: Pirata::User

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(username) ⇒ User

Returns a new instance of User.


6
7
8
9
# File 'lib/pirata/user.rb', line 6

def initialize(username)
  @username = username
  @profile_url = "#{Pirata.config[:base_url]}/user/#{@username}"
end

Instance Attribute Details

#profile_urlObject (readonly)

Returns the value of attribute profile_url.


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

def profile_url
  @profile_url
end

#usernameObject (readonly)

Returns the value of attribute username.


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

def username
  @username
end

Instance Method Details

#to_sObject


11
12
13
# File 'lib/pirata/user.rb', line 11

def to_s
  @username
end