Module: SCOAuthActiveResource
- Defined in:
- lib/soundcloud/sc_oauth_active_resource.rb
Class Method Summary collapse
-
.register(add_to_module, model_module, options = {}) ⇒ Object
TODO check if klass has ancestor OAuthActiveResource.
Class Method Details
.register(add_to_module, model_module, options = {}) ⇒ Object
TODO check if klass has ancestor OAuthActiveResource
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/soundcloud/sc_oauth_active_resource.rb', line 11 def self.register(add_to_module, model_module, = {}) oauth_connection = [:access_token] if oauth_connection.nil? oauth_connection = Soundcloud::PublicOAuthAccessToken.new([:consumer_key]) end temp_hash = {:access_token => oauth_connection} .merge!(temp_hash) mod = OAuthActiveResource.register(add_to_module, model_module, ) return mod end |