Sha256: 3811eb6c4af60a4c6c5633b1ca442284cab88668253062b540584708ff2a520b
Contents?: true
Size: 388 Bytes
Versions: 6
Compression:
Stored size: 388 Bytes
Contents
class SnippetFinder class << self def find(id) find_map('find',id) end def find_by_name(name) find_map('find_by_name', name) end def finder_types [SnippetFile, Snippet] end private def find_map(meth, *args) finder_types.find{|type| found = type.send(meth, *args) return found if found } end end end
Version data entries
6 entries across 6 versions & 2 rubygems