Sha256: c4c6e23d63a6f86f7ec9b8ce40da747b3d6dfd0c75ca756d30528b7a555a0501
Contents?: true
Size: 219 Bytes
Versions: 3
Compression:
Stored size: 219 Bytes
Contents
module ActiveEnumerable module ScopeMethod def scope(&block) result = instance_exec(&block) if result.is_a? Array __new_relation__(result) else result end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
active_enumerable-1.1.0 | lib/active_enumerable/scope_method.rb |
active_enumerable-1.0.0 | lib/active_enumerable/scope_method.rb |
active_enumerable-0.2.0 | lib/active_enumerable/scope_method.rb |