Class: Legalizer::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/legalizer/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Config

Returns a new instance of Config.



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/legalizer/config.rb', line 4

def initialize(options={})
  @connection = OAuth::Consumer.new(options[:oauth_key], options[:oauth_secret], {
    :site               => "https://rightsignature.com",
    :scheme             => :header,
    :http_method        => :post,
    :request_token_path => "/oauth/request_token",
    :access_token_path  => "/oauth/access_token",
    :authorize_path     => "/oauth/authorize"
  })
  
  @token = OAuth::Token.new(options[:access_token], options[:access_secret])
end

Instance Attribute Details

#connectionObject (readonly)

Returns the value of attribute connection.



3
4
5
# File 'lib/legalizer/config.rb', line 3

def connection
  @connection
end

#tokenObject (readonly)

Returns the value of attribute token.



3
4
5
# File 'lib/legalizer/config.rb', line 3

def token
  @token
end