Class: GProv::Connection
- Inherits:
-
Object
- Object
- GProv::Connection
- Includes:
- HTTParty
- Defined in:
- lib/gprov/connection.rb
Instance Attribute Summary collapse
-
#domain ⇒ Object
readonly
Returns the value of attribute domain.
Instance Method Summary collapse
- #default_headers ⇒ Object
-
#initialize(domain, token, options = {}) ⇒ Connection
constructor
A new instance of Connection.
Constructor Details
#initialize(domain, token, options = {}) ⇒ Connection
Returns a new instance of Connection.
29 30 31 32 33 34 35 36 37 |
# File 'lib/gprov/connection.rb', line 29 def initialize(domain, token, = {}) @domain = domain @token = token @options = if @options[:debug] self.class.debug_output $stderr end end |
Instance Attribute Details
#domain ⇒ Object (readonly)
Returns the value of attribute domain.
28 29 30 |
# File 'lib/gprov/connection.rb', line 28 def domain @domain end |
Instance Method Details
#default_headers ⇒ Object
39 40 41 42 43 44 |
# File 'lib/gprov/connection.rb', line 39 def default_headers {:headers => { 'Authorization' => "GoogleLogin auth=#{@token}", 'Content-Type' => 'application/atom+xml', }} end |