Class: Harmoniser::Options
- Inherits:
-
Object
- Object
- Harmoniser::Options
- Defined in:
- lib/harmoniser/options.rb
Constant Summary collapse
- DEFAULT =
{ concurrency: -> { Float::INFINITY }, environment: -> { ENV.fetch("RAILS_ENV", ENV.fetch("RACK_ENV", "production")) }, require: -> { "." }, timeout: -> { 25 }, verbose: -> { false } }.freeze
Instance Method Summary collapse
-
#initialize(**kwargs) ⇒ Options
constructor
A new instance of Options.
- #production? ⇒ Boolean
- #unbounded_concurrency? ⇒ Boolean
- #verbose? ⇒ Boolean
Constructor Details
Instance Method Details
#production? ⇒ Boolean
19 20 21 |
# File 'lib/harmoniser/options.rb', line 19 def production? environment == "production" end |
#unbounded_concurrency? ⇒ Boolean
23 24 25 |
# File 'lib/harmoniser/options.rb', line 23 def unbounded_concurrency? concurrency == Float::INFINITY end |
#verbose? ⇒ Boolean
27 28 29 |
# File 'lib/harmoniser/options.rb', line 27 def verbose? !!verbose end |