Class: Inquisitor::Node

Inherits:
Object
  • Object
show all
Includes:
DataMapper::Resource
Defined in:
lib/inquisitor/node.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.check_allObject



20
21
22
# File 'lib/inquisitor/node.rb', line 20

def self.check_all
  all.each &:check_and_notify
end

Instance Method Details

#check_and_notifyObject



16
17
18
# File 'lib/inquisitor/node.rb', line 16

def check_and_notify
  notify unless run == :up
end

#check_protocolObject



28
29
30
31
32
33
# File 'lib/inquisitor/node.rb', line 28

def check_protocol
  outpost
  true
rescue URI::InvalidURIError
  false
end

#last_logObject



24
25
26
# File 'lib/inquisitor/node.rb', line 24

def last_log
  outpost.messages.join('<br />')
end