class Ohm::Set
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.
Public Class Methods
new(model, namespace, key)
click to toggle source
# 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