Class: Object

Inherits:
BasicObject
Defined in:
lib/extensions/token_ext.rb,
lib/extensions/options_helper.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#options_helper(options, arry) ⇒ String

Object#options_helper -> String

Parameters:

  • options (Hash)

    Hash with params for response.

  • arry (Array)

    Array of possible params for response.

Returns:



9
10
11
12
13
14
15
16
# File 'lib/extensions/options_helper.rb', line 9

def options_helper(options, arry)
  params = ""
  opt = arry
  options.each_key do |k, v|
    params.insert(params.length, "&#{k}=#{v}") if opt.include? k
  end
  params
end

#token_ext(token) ⇒ String

Object#token_ext -> String

Helper method to check if token is correct

Parameters:

Returns:



9
10
11
# File 'lib/extensions/token_ext.rb', line 9

def token_ext(token)
  token || Genius::Auth.instance_variable_get(:@token)
end