Sha256: 8c3ceafdd7bc7d6e90171ac8b3ab49523440e1d349e16873f0962a217a1663ff

Contents?: true

Size: 820 Bytes

Versions: 3

Compression:

Stored size: 820 Bytes

Contents

require 'rubygems'

gem 'activeresource'
require 'active_resource'
require 'digest/md5'
require File.expand_path('../public_oauth_access_token', __FILE__)

module SCOAuthActiveResource 
  
  # TODO check if klass has ancestor OAuthActiveResource
  def self.register(add_to_module, model_module, options = {})
      
    oauth_connection = options[:access_token]
    
    if oauth_connection.nil?
      oauth_connection = Soundcloud::PublicOAuthAccessToken.new(options[:consumer_key])
    end

    temp_hash = {:access_token => oauth_connection}
    options.merge!(temp_hash)

    mod = OAuthActiveResource.register(add_to_module, model_module, options)
    return mod
  end
  
end

require 'oauth_active_resource/connection'
require 'oauth_active_resource/resource'
require 'oauth_active_resource/unique_resource_array'

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
soundcloud-ruby-api-wrapper-0.4.8 lib/soundcloud/sc_oauth_active_resource.rb
soundcloud-ruby-api-wrapper-0.4.7 lib/soundcloud/sc_oauth_active_resource.rb
soundcloud-ruby-api-wrapper-0.4.6 lib/soundcloud/sc_oauth_active_resource.rb