Class: FastMethodSource::Method
- Inherits:
-
Object
- Object
- FastMethodSource::Method
- Includes:
- MethodExtensions
- Defined in:
- lib/fast_method_source.rb
Instance Method Summary collapse
-
#initialize(method) ⇒ Method
constructor
A new instance of Method.
- #name ⇒ Object
- #source_location ⇒ Object
Methods included from MethodExtensions
Constructor Details
#initialize(method) ⇒ Method
Returns a new instance of Method.
16 17 18 |
# File 'lib/fast_method_source.rb', line 16 def initialize(method) @method = method end |
Instance Method Details
#name ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/fast_method_source.rb', line 24 def name if @method.respond_to?(:name) @method.name else @method.inspect end end |
#source_location ⇒ Object
20 21 22 |
# File 'lib/fast_method_source.rb', line 20 def source_location @method.source_location end |