Class: YARD::CodeObjects::ExtendedMethodObject
- Inherits:
-
Object
- Object
- YARD::CodeObjects::ExtendedMethodObject
- 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.
Instance Method Summary (collapse)
-
- (ExtendedMethodObject) initialize(obj)
constructor
Sets up a delegate for MethodObject obj.
-
- (Object) method_missing(sym, *args, &block)
Sends all methods to the MethodObject assigned in #initialize.
-
- (Symbol) scope
Always :class.
Constructor Details
- (ExtendedMethodObject) initialize(obj)
Sets up a delegate for MethodObject obj.
16 |
# File 'lib/yard/code_objects/extended_method_object.rb', line 16 def initialize(obj) @del = obj end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
- (Object) method_missing(sym, *args, &block)
Sends all methods to the MethodObject assigned in #initialize
21 |
# File 'lib/yard/code_objects/extended_method_object.rb', line 21 def method_missing(sym, *args, &block) @del.__send__(sym, *args, &block) end |
Instance Method Details
- (Symbol) scope
Returns always :class
10 |
# File 'lib/yard/code_objects/extended_method_object.rb', line 10 def scope; :class end |