Class: CopyleaksApi::Config
- Inherits:
-
Object
- Object
- CopyleaksApi::Config
- Defined in:
- lib/copyleaks_api/config.rb
Constant Summary collapse
- DEFAULTS =
{ sandbox_mode: false, allow_partial_scan: false, http_callback: nil, email_callback: nil, custom_fields: {}, }.freeze
Class Attribute Summary collapse
-
.allow_partial_scan ⇒ Object
writeonly
Sets the attribute allow_partial_scan.
-
.custom_fields ⇒ Object
writeonly
Sets the attribute custom_fields.
-
.email_callback ⇒ Object
writeonly
Sets the attribute email_callback.
-
.http_callback ⇒ Object
writeonly
Sets the attribute http_callback.
-
.sandbox_mode ⇒ Object
writeonly
Sets the attribute sandbox_mode.
Class Method Summary collapse
-
.config {|_self| ... } ⇒ Object
provide block syntax possibility for setting options.
-
.reset ⇒ Object
reset all options to default.
Class Attribute Details
.allow_partial_scan=(value) ⇒ Object (writeonly)
Sets the attribute allow_partial_scan
12 13 14 |
# File 'lib/copyleaks_api/config.rb', line 12 def allow_partial_scan=(value) @allow_partial_scan = value end |
.custom_fields=(value) ⇒ Object (writeonly)
Sets the attribute custom_fields
12 13 14 |
# File 'lib/copyleaks_api/config.rb', line 12 def custom_fields=(value) @custom_fields = value end |
.email_callback=(value) ⇒ Object (writeonly)
Sets the attribute email_callback
12 13 14 |
# File 'lib/copyleaks_api/config.rb', line 12 def email_callback=(value) @email_callback = value end |
.http_callback=(value) ⇒ Object (writeonly)
Sets the attribute http_callback
12 13 14 |
# File 'lib/copyleaks_api/config.rb', line 12 def http_callback=(value) @http_callback = value end |
.sandbox_mode=(value) ⇒ Object (writeonly)
Sets the attribute sandbox_mode
12 13 14 |
# File 'lib/copyleaks_api/config.rb', line 12 def sandbox_mode=(value) @sandbox_mode = value end |
Class Method Details
.config {|_self| ... } ⇒ Object
provide block syntax possibility for setting options
24 25 26 |
# File 'lib/copyleaks_api/config.rb', line 24 def config yield(self) end |
.reset ⇒ Object
reset all options to default
29 30 31 |
# File 'lib/copyleaks_api/config.rb', line 29 def reset DEFAULTS.each { |attr, value| instance_variable_set("@#{attr}", value) } end |