Class: LS4::FaultList
- Defined in:
- lib/ls4/logic/fault_detector.rb
Instance Method Summary collapse
- #from_msgpack(msg) ⇒ Object
- #get_list ⇒ Object
- #include?(nid) ⇒ Boolean
-
#initialize ⇒ FaultList
constructor
A new instance of FaultList.
- #to_msgpack(out = '') ⇒ Object
- #update(nids) ⇒ Object
Methods inherited from TSVData
Constructor Details
#initialize ⇒ FaultList
Returns a new instance of FaultList.
22 23 24 25 26 |
# File 'lib/ls4/logic/fault_detector.rb', line 22 def initialize @path = nil @fault_nids = [] super() end |
Instance Method Details
#from_msgpack(msg) ⇒ Object
46 47 48 49 50 |
# File 'lib/ls4/logic/fault_detector.rb', line 46 def from_msgpack(msg) @fault_nids = msg on_change self end |
#get_list ⇒ Object
38 39 40 |
# File 'lib/ls4/logic/fault_detector.rb', line 38 def get_list @fault_nids.dup end |
#include?(nid) ⇒ Boolean
34 35 36 |
# File 'lib/ls4/logic/fault_detector.rb', line 34 def include?(nid) @fault_nids.include?(nid) end |
#to_msgpack(out = '') ⇒ Object
42 43 44 |
# File 'lib/ls4/logic/fault_detector.rb', line 42 def to_msgpack(out = '') @fault_nids.to_msgpack(out) end |
#update(nids) ⇒ Object
28 29 30 31 32 |
# File 'lib/ls4/logic/fault_detector.rb', line 28 def update(nids) @fault_nids = nids.dup on_change nil end |