module Dota::Utilities::Mapped::ClassMethods
Public Instance Methods
all()
click to toggle source
# File lib/dota/utils/mapped.rb, line 23 def all @all ||= mapping.keys.map { |id| new(id) } end
mapping()
click to toggle source
# File lib/dota/utils/mapped.rb, line 15 def mapping @mapping ||= begin filename = "#{name.split("::").last.downcase}.yml" path = File.join(Dota.root, "data", filename) YAML.load_file(path).freeze end end