class Discover::Service::Update

Public Class Methods

from_hash(hash) click to toggle source
# File lib/discover.rb, line 130
def self.from_hash(hash)
  new *hash.values_at("Addr", "Attrs", "Created", "Name", "Online")
end

Public Instance Methods

attributes() click to toggle source
Calls superclass method
# File lib/discover.rb, line 134
def attributes
  super || {}
end
offline?() click to toggle source
# File lib/discover.rb, line 142
def offline?
  !online?
end
online?() click to toggle source
# File lib/discover.rb, line 138
def online?
  online == true
end
sentinel?() click to toggle source

The sentinel update marks the end of existing updates from discoverd

# File lib/discover.rb, line 147
def sentinel?
  address.empty? && name.empty?
end