Class: Mrsk::Configuration::Boot

Inherits:
Object
  • Object
show all
Defined in:
lib/mrsk/configuration/boot.rb

Instance Method Summary collapse

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

#limitObject



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

#waitObject



17
18
19
# File 'lib/mrsk/configuration/boot.rb', line 17

def wait
  @options["wait"]
end