Class: FastMethodSource::Method

Inherits:
Object
  • Object
show all
Includes:
MethodExtensions
Defined in:
lib/fast_method_source.rb

Instance Method Summary collapse

Methods included from MethodExtensions

#comment, #source

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

#nameObject



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_locationObject



20
21
22
# File 'lib/fast_method_source.rb', line 20

def source_location
  @method.source_location
end