Class: Mrsk::Configuration::Boot
- Inherits:
-
Object
- Object
- Mrsk::Configuration::Boot
- Defined in:
- lib/mrsk/configuration/boot.rb
Instance Method Summary collapse
-
#initialize(config:) ⇒ Boot
constructor
A new instance of Boot.
- #limit ⇒ Object
- #wait ⇒ Object
Constructor Details
#initialize(config:) ⇒ Boot
Returns a new instance of Boot.
2 3 4 5 |
# File 'lib/mrsk/configuration/boot.rb', line 2 def initialize(config:) @options = config.raw_config.boot || {} @host_count = config.all_hosts.count end |
Instance Method Details
#limit ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/mrsk/configuration/boot.rb', line 7 def limit limit = @options["limit"] if limit.to_s.end_with?("%") @host_count * limit.to_i / 100 else limit end end |
#wait ⇒ Object
17 18 19 |
# File 'lib/mrsk/configuration/boot.rb', line 17 def wait @options["wait"] end |