Class: PAS::Resource
- Inherits:
-
ActiveResource::Base
- Object
- ActiveResource::Base
- PAS::Resource
show all
- Defined in:
- lib/pas/resource.rb
Class Method Summary
collapse
Class Method Details
.connection(refresh = false) ⇒ Object
6
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/pas/resource.rb', line 6
def connection(refresh = false)
if defined?(@connection) || superclass == Object
@connection = PAS::Connection.new(site, format) if refresh || @connection.nil?
@connection.user = user if user
@connection.password = password if password
@connection.timeout = timeout if timeout
@connection
else
superclass.connection
end
end
|