Class: MyOwnAdverts::Advert

Inherits:
ActiveResource::Base
  • Object
show all
Defined in:
lib/myownadverts/advert.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.passwordObject (readonly)

Returns the value of attribute password.



6
7
8
# File 'lib/myownadverts/advert.rb', line 6

def password
  @password
end

.usernameObject (readonly)

Returns the value of attribute username.



6
7
8
# File 'lib/myownadverts/advert.rb', line 6

def username
  @username
end

Class Method Details

.login(username, password) ⇒ Object



8
9
10
# File 'lib/myownadverts/advert.rb', line 8

def (username, password)
  @username, @password = username, password
end

.siteid=(siteid) ⇒ Object



12
13
14
# File 'lib/myownadverts/advert.rb', line 12

def siteid=(siteid)
  self.site = "http://#{username}:#{password}@myownadverts.com/sites/#{siteid}"
end