Sha256: b58e40274d140ca6f85819a9de12fbb5ef3bb9578b79e898c6d79bebf5eaa22b
Contents?: true
Size: 794 Bytes
Versions: 134
Compression:
Stored size: 794 Bytes
Contents
module Flexirest class RequestDelegator < Delegator def initialize(obj) super @delegate_obj = obj end def __getobj__ @delegate_obj end def __setobj__(obj) @delegate_obj = obj end def class @delegate_obj.class end def method_missing(name, *args, &block) # Handles issue with private method 'test' on base Ruby Object return @delegate_obj.test if name.to_sym == :test # Forward request to delegate @delegate_obj.send(name, *args, &block) end def kind_of?(obj) @delegate_obj.kind_of?(obj) end def is_a?(obj) @delegate_obj.is_a?(obj) end def instance_of?(obj) @delegate_obj.instance_of?(obj) end def _delegate? return true end end end
Version data entries
134 entries across 134 versions & 1 rubygems