Class: OmniAuth::Swagger::UIDOptions
- Inherits:
-
Object
- Object
- OmniAuth::Swagger::UIDOptions
- Defined in:
- lib/omniauth/swagger/uid_options.rb
Constant Summary collapse
- OPTION_API =
'api'.freeze
- OPTION_API_PARAMS =
'api_params'.freeze
- OPTION_PARAM =
'param'.freeze
Instance Attribute Summary collapse
-
#api ⇒ Object
Returns the value of attribute api.
-
#api_params ⇒ Object
Returns the value of attribute api_params.
-
#param ⇒ Object
Returns the value of attribute param.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#api ⇒ Object
Returns the value of attribute api.
9 10 11 |
# File 'lib/omniauth/swagger/uid_options.rb', line 9 def api @api end |
#api_params ⇒ Object
Returns the value of attribute api_params.
9 10 11 |
# File 'lib/omniauth/swagger/uid_options.rb', line 9 def api_params @api_params end |
#param ⇒ Object
Returns the value of attribute param.
9 10 11 |
# File 'lib/omniauth/swagger/uid_options.rb', line 9 def param @param end |
Class Method Details
.from_options(opts) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/omniauth/swagger/uid_options.rb', line 11 def self.(opts) return nil if opts.nil? unless opts.kind_of?(Hash) opts = {OPTION_API => opts} end = new .api = opts[OPTION_API] .api_params = opts[OPTION_API_PARAMS] .param = opts[OPTION_PARAM] end |
Instance Method Details
#access_token_param? ⇒ Boolean
27 28 29 |
# File 'lib/omniauth/swagger/uid_options.rb', line 27 def access_token_param? param != nil end |
#api? ⇒ Boolean
23 24 25 |
# File 'lib/omniauth/swagger/uid_options.rb', line 23 def api? api != nil end |
#api_operation ⇒ Object
35 36 37 |
# File 'lib/omniauth/swagger/uid_options.rb', line 35 def api_operation @api_operation ||= api.split("#").first end |
#api_value_path ⇒ Object
31 32 33 |
# File 'lib/omniauth/swagger/uid_options.rb', line 31 def api_value_path @api_value_path ||= api.split("#")[1] end |