Class: PerformancePromise::Configuration
- Inherits:
-
Object
- Object
- PerformancePromise::Configuration
- Defined in:
- lib/performance_promise.rb
Instance Attribute Summary collapse
-
#allowed_environments ⇒ Object
Returns the value of attribute allowed_environments.
-
#enable ⇒ Object
Returns the value of attribute enable.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#speedy_promise ⇒ Object
Returns the value of attribute speedy_promise.
-
#throw_exception ⇒ Object
Returns the value of attribute throw_exception.
-
#untagged_methods_are_speedy ⇒ Object
Returns the value of attribute untagged_methods_are_speedy.
-
#validations ⇒ Object
Returns the value of attribute validations.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/performance_promise.rb', line 53 def initialize # Set default values @enable = false @validations = [ :makes, ] @logger = Rails.logger @allowed_environments = [ 'development', 'test', ] @untagged_methods_are_speedy = false @speedy_promise = { :makes => 1.query, :takes => 1.second, } @throw_exception = true end |
Instance Attribute Details
#allowed_environments ⇒ Object
Returns the value of attribute allowed_environments.
48 49 50 |
# File 'lib/performance_promise.rb', line 48 def allowed_environments @allowed_environments end |
#enable ⇒ Object
Returns the value of attribute enable.
45 46 47 |
# File 'lib/performance_promise.rb', line 45 def enable @enable end |
#logger ⇒ Object
Returns the value of attribute logger.
47 48 49 |
# File 'lib/performance_promise.rb', line 47 def logger @logger end |
#speedy_promise ⇒ Object
Returns the value of attribute speedy_promise.
49 50 51 |
# File 'lib/performance_promise.rb', line 49 def speedy_promise @speedy_promise end |
#throw_exception ⇒ Object
Returns the value of attribute throw_exception.
51 52 53 |
# File 'lib/performance_promise.rb', line 51 def throw_exception @throw_exception end |
#untagged_methods_are_speedy ⇒ Object
Returns the value of attribute untagged_methods_are_speedy.
50 51 52 |
# File 'lib/performance_promise.rb', line 50 def untagged_methods_are_speedy @untagged_methods_are_speedy end |
#validations ⇒ Object
Returns the value of attribute validations.
46 47 48 |
# File 'lib/performance_promise.rb', line 46 def validations @validations end |