Sha256: 709ad3091c3dc7f6ae7a5a958acfe841135a680adf887551787135bf6140efc8
Contents?: true
Size: 786 Bytes
Versions: 20
Compression:
Stored size: 786 Bytes
Contents
module YARD::CodeObjects # Represents an instance method of a module that was mixed into the class # scope of another namespace. # # @see MethodObject class ExtendedMethodObject instance_methods.each {|m| undef_method(m) unless m =~ /^__/ || m.to_sym == :object_id } # @return [Symbol] always +:class+ def scope; :class end # Sets up a delegate for {MethodObject} obj. # # @param [MethodObject] obj the instance method to treat as a mixed in # class method on another namespace. def initialize(obj) @del = obj end # Sends all methods to the {MethodObject} assigned in {#initialize} # @see #initialize # @see MethodObject def method_missing(sym, *args, &block) @del.__send__(sym, *args, &block) end end end
Version data entries
20 entries across 20 versions & 1 rubygems