Class: IORB::DropManager

Inherits:
Object
  • Object
show all
Defined in:
lib/iorb.rb

Class Method Summary collapse

Class Method Details

.eachObject



25
26
27
28
29
30
31
32
33
# File 'lib/iorb.rb', line 25

def self.each
  drops = YAML.load_file(IORB::Config.file)['mydrops']
  if not drops.nil?
    drops.each do |key, val|
      next if val['destroyed'] == true
      yield IORB::DropDetails.build_from(val)
    end
  end
end

.find(name) ⇒ Object



34
35
36
37
38
39
# File 'lib/iorb.rb', line 34

def self.find(name)
  each do |details|
    return details if details['name'] == name
  end
  nil
end