Sha256: c5bd62ab049ef84cc6ebc3ce8a8aa1a281b9e15089a76e995ab4a225eb267f76
Contents?: true
Size: 537 Bytes
Versions: 1
Compression:
Stored size: 537 Bytes
Contents
module Shopper module CallerAttachable extend ActiveSupport::Concern included do def attach(caller) @caller = caller self end def method_missing(method_name, *args, &block) if @caller&.respond_to?(method_name, true) @caller.send(method_name, *args, &block) else super end end def respond_to_missing?(method_name, include_private = false) @caller&.respond_to?(method_name, include_private) || super end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
shoppper-0.1.0 | app/decorators/concerns/shopper/caller_attachable.rb |