Class: Gimme::ClassMethodStore
Instance Method Summary collapse
Methods inherited from Store
#clear, #get, #initialize, #reset
Constructor Details
This class inherits a constructor from Gimme::Store
Instance Method Details
#set(cls, method_name) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/gimme/method_store.rb', line 5 def set(cls, method_name) id = cls.__id__ = (class << cls; self; end) @store[id] ||= {} if .method_defined?(method_name) && !@store[id][method_name] @store[id][method_name] = cls.method(method_name) end end |