Sha256: e9509eac35ed72ff111e496fac35c17d525eda06b1b9808d2fb8507e8ca15346

Contents?: true

Size: 770 Bytes

Versions: 106

Compression:

Stored size: 770 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

106 entries across 86 versions & 10 rubygems

Version Path
abaci-0.3.0 vendor/bundle/gems/yard-0.9.2/lib/yard/code_objects/extended_method_object.rb
abaci-0.3.0 vendor/bundle/gems/yard-0.9.1/lib/yard/code_objects/extended_method_object.rb
yard-0.9.5 lib/yard/code_objects/extended_method_object.rb
yard-0.9.4 lib/yard/code_objects/extended_method_object.rb
yard-0.9.3 lib/yard/code_objects/extended_method_object.rb
yard-0.9.2 lib/yard/code_objects/extended_method_object.rb
yard-0.9.1 lib/yard/code_objects/extended_method_object.rb
yard-0.9.0 lib/yard/code_objects/extended_method_object.rb
yard-0.8.7.6 lib/yard/code_objects/extended_method_object.rb
yard-0.8.7.5 lib/yard/code_objects/extended_method_object.rb
climine-0.0.7 vendor/bundle/ruby/2.1.0/gems/yard-0.8.7.3/lib/yard/code_objects/extended_method_object.rb
climine-0.0.7 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/lib/yard/code_objects/extended_method_object.rb
climine-0.0.6 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/lib/yard/code_objects/extended_method_object.rb
climine-0.0.5 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/lib/yard/code_objects/extended_method_object.rb
yard-0.8.7.4 lib/yard/code_objects/extended_method_object.rb
climine-0.0.4 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/lib/yard/code_objects/extended_method_object.rb
climine-0.0.3 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/lib/yard/code_objects/extended_method_object.rb
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/yard-0.8.7.3/lib/yard/code_objects/extended_method_object.rb
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/yard-0.8.7.3/lib/yard/code_objects/extended_method_object.rb
mango-0.7.0 vendor/bundler/ruby/2.0.0/gems/yard-0.8.7.3/lib/yard/code_objects/extended_method_object.rb