Sha256: 8fc8132445314bef1804c78f3e7459eb676ef83780fc983cbe6224f17e050ff9
Contents?: true
Size: 373 Bytes
Versions: 15
Compression:
Stored size: 373 Bytes
Contents
# frozen_string_literal: true module LazyRecord # Add ActiveRecord-style scope macros to your classes. Allows chaining. module Scopes SCOPE_MODULE_NAME = :ScopeMethods def lr_scope(method_name, lambda) extend mod = get_or_set_mod(SCOPE_MODULE_NAME) mod.module_eval do send(:define_method, method_name, &lambda) end end end end
Version data entries
15 entries across 15 versions & 1 rubygems