Class: TrainSH::Detectors::TargetDetector

Inherits:
Object
  • Object
show all
Defined in:
lib/trainsh/detectors/target.rb

Direct Known Subclasses

EnvTarget, KitchenTarget

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.descendantsObject



4
5
6
# File 'lib/trainsh/detectors/target.rb', line 4

def self.descendants
  ObjectSpace.each_object(Class).select { |klass| klass < self }
end

Instance Method Details

#to_sObject



8
9
10
# File 'lib/trainsh/detectors/target.rb', line 8

def to_s
  self.class.to_s
end

#urlObject



12
13
14
# File 'lib/trainsh/detectors/target.rb', line 12

def url
  raise "Implement `url` for target detector #{self}"
end