Class: DogEventer::Host
Instance Attribute Summary
Attributes inherited from Scope
Instance Method Summary collapse
- #chef_run(&block) ⇒ Object
-
#initialize(start_time, host_name) ⇒ Host
constructor
A new instance of Host.
- #nagios_check(check_name, &block) ⇒ Object
Constructor Details
#initialize(start_time, host_name) ⇒ Host
Returns a new instance of Host.
11 12 13 14 |
# File 'lib/dogeventer/scope.rb', line 11 def initialize(start_time, host_name) super start_time @host_name = host_name end |
Instance Method Details
#chef_run(&block) ⇒ Object
22 23 24 25 26 |
# File 'lib/dogeventer/scope.rb', line 22 def chef_run(&block) c = ChefRun.new(@host_name, @start_time) c.instance_eval &block @events += c.events end |
#nagios_check(check_name, &block) ⇒ Object
16 17 18 19 20 |
# File 'lib/dogeventer/scope.rb', line 16 def nagios_check(check_name, &block) n = NagiosCheck.new(check_name, @host_name, @start_time) n.instance_eval &block @events += n.events end |