class Flippant::Registry
Attributes
table[R]
Public Class Methods
new()
click to toggle source
# File lib/flippant/registry.rb, line 5 def initialize clear end
Public Instance Methods
clear()
click to toggle source
# File lib/flippant/registry.rb, line 21 def clear @table = {} end
register(group, fun = nil, &block)
click to toggle source
# File lib/flippant/registry.rb, line 9 def register(group, fun = nil, &block) table[group.to_s] = fun || block end
registered()
click to toggle source
# File lib/flippant/registry.rb, line 13 def registered table end
registered?(group)
click to toggle source
# File lib/flippant/registry.rb, line 17 def registered?(group) table.key?(group.to_s) end