Class: RailsApiKeys::UI::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_api_keys/ui/configuration.rb

Overview

Host overrides. Set via configure.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



14
15
16
17
18
19
20
21
# File 'lib/rails_api_keys/ui/configuration.rb', line 14

def initialize
  @parent_controller = "ApplicationController"
  @current_owner = ->(controller) { controller.current_user }
  @authorize = nil
  @policy_class = "RailsApiKeys::UI::ApiKeyPolicy"
  @raw_token_flash_key = :rails_api_keys_raw_token
  @include_stylesheet = true
end

Instance Attribute Details

#authorizeObject

Returns the value of attribute authorize.



7
8
9
# File 'lib/rails_api_keys/ui/configuration.rb', line 7

def authorize
  @authorize
end

#current_ownerObject

Returns the value of attribute current_owner.



7
8
9
# File 'lib/rails_api_keys/ui/configuration.rb', line 7

def current_owner
  @current_owner
end

#include_stylesheetObject

Returns the value of attribute include_stylesheet.



7
8
9
# File 'lib/rails_api_keys/ui/configuration.rb', line 7

def include_stylesheet
  @include_stylesheet
end

#parent_controllerObject

Returns the value of attribute parent_controller.



7
8
9
# File 'lib/rails_api_keys/ui/configuration.rb', line 7

def parent_controller
  @parent_controller
end

#policy_classObject

Returns the value of attribute policy_class.



7
8
9
# File 'lib/rails_api_keys/ui/configuration.rb', line 7

def policy_class
  @policy_class
end

#raw_token_flash_keyObject

Returns the value of attribute raw_token_flash_key.



7
8
9
# File 'lib/rails_api_keys/ui/configuration.rb', line 7

def raw_token_flash_key
  @raw_token_flash_key
end