Class: Turnstile::Configuration
- Inherits:
-
Object
- Object
- Turnstile::Configuration
- Defined in:
- lib/turnstile/configuration.rb
Constant Summary collapse
- DEFAULTS =
{ enabled: true, server_url: "https://challenges.cloudflare.com/turnstile/v0/siteverify", script_url: "https://challenges.cloudflare.com/turnstile/v0/api.js" }.freeze
Instance Attribute Summary collapse
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#on_failure ⇒ Object
Returns the value of attribute on_failure.
-
#script_url ⇒ Object
Returns the value of attribute script_url.
-
#secret_key ⇒ Object
Returns the value of attribute secret_key.
-
#server_url ⇒ Object
Returns the value of attribute server_url.
-
#site_key ⇒ Object
Returns the value of attribute site_key.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
12 13 14 15 16 17 |
# File 'lib/turnstile/configuration.rb', line 12 def initialize @enabled = DEFAULTS[:enabled] @server_url = DEFAULTS[:server_url] @script_url = DEFAULTS[:script_url] @on_failure = nil end |
Instance Attribute Details
#enabled ⇒ Object
Returns the value of attribute enabled.
10 11 12 |
# File 'lib/turnstile/configuration.rb', line 10 def enabled @enabled end |
#on_failure ⇒ Object
Returns the value of attribute on_failure.
10 11 12 |
# File 'lib/turnstile/configuration.rb', line 10 def on_failure @on_failure end |
#script_url ⇒ Object
Returns the value of attribute script_url.
10 11 12 |
# File 'lib/turnstile/configuration.rb', line 10 def script_url @script_url end |
#secret_key ⇒ Object
Returns the value of attribute secret_key.
10 11 12 |
# File 'lib/turnstile/configuration.rb', line 10 def secret_key @secret_key end |
#server_url ⇒ Object
Returns the value of attribute server_url.
10 11 12 |
# File 'lib/turnstile/configuration.rb', line 10 def server_url @server_url end |
#site_key ⇒ Object
Returns the value of attribute site_key.
10 11 12 |
# File 'lib/turnstile/configuration.rb', line 10 def site_key @site_key end |