- Defined in:
In Ohm v1.2, the Set initialize method is defined on itself. Hence the trick of doing a module OverloadedSet with an initialize method doesn't work anymore.
The simplest way to solve that as of now is to duplicate and extend the #initialize method for Ohm::Set.
Granted it's not the ideal way, the drawbacks are outweighed by the simplicity and performance of this approach versus other monkey-patching techniques.
Instance Method Summary collapse
#initialize(model, namespace, key) ⇒ Set
A new instance of Set.
#initialize(model, namespace, key) ⇒
Returns a new instance of Set.
30 31 32 33 34 35 36
# File 'lib/ohm/scope.rb', line 30 def initialize(model, namespace, key) @model = model @namespace = namespace @key = key extend model::DefinedScopes if defined?(model::DefinedScopes) end