Class: YARD::CodeObjects::ExtendedMethodObject
| Relationships & Source Files | |
| Inherits: | Object |
| Defined in: | lib/yard/code_objects/extended_method_object.rb |
Overview
Represents an instance method of a module that was mixed into the class scope of another namespace.
Class Method Summary
-
.new(obj) ⇒ ExtendedMethodObject
constructor
Sets up a delegate for
MethodObjectobj.
Instance Method Summary
-
#method_missing(sym, *args, &block)
Sends all methods to the
MethodObjectassigned in#initialize - #scope ⇒ Symbol
Constructor Details
.new(obj) ⇒ ExtendedMethodObject
Sets up a delegate for MethodObject obj.
# File 'lib/yard/code_objects/extended_method_object.rb', line 17
def initialize(obj) @del = obj end
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym, *args, &block)
Sends all methods to the MethodObject assigned in #initialize
# File 'lib/yard/code_objects/extended_method_object.rb', line 22
def method_missing(sym, *args, &block) @del.__send__(sym, *args, &block) end
Instance Method Details
#scope ⇒ Symbol
# File 'lib/yard/code_objects/extended_method_object.rb', line 11
def scope; :class end