Class: Nquery::Configuration
- Inherits:
-
Object
- Object
- Nquery::Configuration
- Defined in:
- lib/nquery/configuration.rb
Instance Attribute Summary collapse
-
#authentication_mode ⇒ Object
Returns the value of attribute authentication_mode.
-
#current_user_method ⇒ Object
Returns the value of attribute current_user_method.
-
#data_sources ⇒ Object
Returns the value of attribute data_sources.
-
#embed_secret ⇒ Object
Returns the value of attribute embed_secret.
-
#parent_controller ⇒ Object
Returns the value of attribute parent_controller.
-
#query_row_limit ⇒ Object
Returns the value of attribute query_row_limit.
-
#query_timeout ⇒ Object
Returns the value of attribute query_timeout.
Instance Method Summary collapse
- #authenticate ⇒ Object
- #authenticate_with(&block) ⇒ Object
- #embed_signing_key ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #resolve_nquery_user(&block) ⇒ Object
- #resolve_user ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/nquery/configuration.rb', line 13 def initialize @authentication_mode = :standalone @current_user_method = :current_nquery_user @data_sources = { main: :rails } @query_timeout = 15 @query_row_limit = 10_000 @embed_secret = nil @authenticate_with = nil @resolve_nquery_user = nil end |
Instance Attribute Details
#authentication_mode ⇒ Object
Returns the value of attribute authentication_mode.
5 6 7 |
# File 'lib/nquery/configuration.rb', line 5 def authentication_mode @authentication_mode end |
#current_user_method ⇒ Object
Returns the value of attribute current_user_method.
6 7 8 |
# File 'lib/nquery/configuration.rb', line 6 def current_user_method @current_user_method end |
#data_sources ⇒ Object
Returns the value of attribute data_sources.
8 9 10 |
# File 'lib/nquery/configuration.rb', line 8 def data_sources @data_sources end |
#embed_secret ⇒ Object
Returns the value of attribute embed_secret.
11 12 13 |
# File 'lib/nquery/configuration.rb', line 11 def @embed_secret end |
#parent_controller ⇒ Object
Returns the value of attribute parent_controller.
7 8 9 |
# File 'lib/nquery/configuration.rb', line 7 def parent_controller @parent_controller end |
#query_row_limit ⇒ Object
Returns the value of attribute query_row_limit.
10 11 12 |
# File 'lib/nquery/configuration.rb', line 10 def query_row_limit @query_row_limit end |
#query_timeout ⇒ Object
Returns the value of attribute query_timeout.
9 10 11 |
# File 'lib/nquery/configuration.rb', line 9 def query_timeout @query_timeout end |
Instance Method Details
#authenticate ⇒ Object
28 29 30 |
# File 'lib/nquery/configuration.rb', line 28 def authenticate @authenticate_with end |
#authenticate_with(&block) ⇒ Object
24 25 26 |
# File 'lib/nquery/configuration.rb', line 24 def authenticate_with(&block) @authenticate_with = block end |
#embed_signing_key ⇒ Object
40 41 42 |
# File 'lib/nquery/configuration.rb', line 40 def || Rails.application.secret_key_base end |
#resolve_nquery_user(&block) ⇒ Object
32 33 34 |
# File 'lib/nquery/configuration.rb', line 32 def resolve_nquery_user(&block) @resolve_nquery_user = block end |
#resolve_user ⇒ Object
36 37 38 |
# File 'lib/nquery/configuration.rb', line 36 def resolve_user @resolve_nquery_user end |