Module: Panda
- Extended by:
- Forwardable, Panda
- Included in:
- Panda
- Defined in:
- lib/panda/base.rb,
lib/panda/error.rb,
lib/panda/panda.rb,
lib/panda/connection.rb,
lib/panda/proxies/proxy.rb,
lib/panda/proxies/scope.rb,
lib/panda/modules/router.rb,
lib/panda/modules/finders.rb,
lib/panda/resources/cloud.rb,
lib/panda/resources/video.rb,
lib/panda/modules/builders.rb,
lib/panda/modules/updatable.rb,
lib/panda/resources/profile.rb,
lib/panda/api_authentication.rb,
lib/panda/resources/encoding.rb,
lib/panda/resources/resource.rb,
lib/panda/proxies/video_scope.rb,
lib/panda/modules/associations.rb,
lib/panda/proxies/profile_scope.rb,
lib/panda/proxies/encoding_scope.rb,
lib/panda/modules/cloud_connection.rb
Defined Under Namespace
Modules: Associations, Builders, CloudConnection, Finders, Router, Updatable Classes: ApiAuthentication, Base, Cloud, Connection, Encoding, EncodingScope, Error, Profile, ProfileScope, Proxy, Resource, Scope, ServiceNotAvailable, Video, VideoScope
Instance Attribute Summary collapse
-
#cloud ⇒ Object
readonly
Returns the value of attribute cloud.
-
#clouds ⇒ Object
readonly
Returns the value of attribute clouds.
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
Instance Method Summary collapse
- #configure(auth_params = nil) ⇒ Object
- #connect!(auth_params, options = {}) ⇒ Object
- #version ⇒ Object
Instance Attribute Details
#cloud ⇒ Object (readonly)
Returns the value of attribute cloud.
9 10 11 |
# File 'lib/panda/panda.rb', line 9 def cloud @cloud end |
#clouds ⇒ Object (readonly)
Returns the value of attribute clouds.
9 10 11 |
# File 'lib/panda/panda.rb', line 9 def clouds @clouds end |
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
10 11 12 |
# File 'lib/panda/panda.rb', line 10 def connection @connection end |
Instance Method Details
#configure(auth_params = nil) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/panda/panda.rb', line 14 def configure(auth_params=nil) @clouds = {} if auth_params connect!(auth_params) else yield @connection = Connection.new end @connection.raise_error=true @connection.format = :hash @cloud = Cloud::new(:id => @connection.cloud_id) end |
#connect!(auth_params, options = {}) ⇒ Object
28 29 30 |
# File 'lib/panda/panda.rb', line 28 def connect!(auth_params, ={}) @connection = Connection.new(auth_params, ) end |
#version ⇒ Object
37 38 39 40 41 |
# File 'lib/panda/panda.rb', line 37 def version open(File.join(File.dirname(__FILE__), '../../VERSION')) { |f| f.read.strip } end |