Class: Noah::Watchers

Inherits:
Object
  • Object
show all
Defined in:
lib/noah/models/watchers.rb

Constant Summary collapse

@@agents =
[]

Class Method Summary collapse

Class Method Details

.agentsObject



64
65
66
# File 'lib/noah/models/watchers.rb', line 64

def self.agents
  @@agents
end

.all(options = {}) ⇒ Object



56
57
58
# File 'lib/noah/models/watchers.rb', line 56

def self.all(options = {})
  options.empty? ? Watcher.all.sort : Watcher.find(options).sort
end

.register_agent(agent_class) ⇒ Object



60
61
62
# File 'lib/noah/models/watchers.rb', line 60

def self.register_agent(agent_class)
  @@agents << agent_class
end