Class: AppMap::Trace::RubyMethod

Inherits:
Object
  • Object
show all
Defined in:
lib/appmap/trace.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(package, class_name, method, static) ⇒ RubyMethod

Returns a new instance of RubyMethod.



8
9
10
11
12
13
# File 'lib/appmap/trace.rb', line 8

def initialize(package, class_name, method, static)
  @package = package
  @class_name = class_name
  @method = method
  @static = static
end

Instance Attribute Details

#class_nameObject (readonly)

Returns the value of attribute class_name.



6
7
8
# File 'lib/appmap/trace.rb', line 6

def class_name
  @class_name
end

#staticObject (readonly)

Returns the value of attribute static.



6
7
8
# File 'lib/appmap/trace.rb', line 6

def static
  @static
end

Instance Method Details

#commentObject



19
20
21
22
23
# File 'lib/appmap/trace.rb', line 19

def comment
  @method.comment
rescue MethodSource::SourceNotFoundError
  nil
end

#labelsObject



33
34
35
# File 'lib/appmap/trace.rb', line 33

def labels
  @package.labels
end

#nameObject



29
30
31
# File 'lib/appmap/trace.rb', line 29

def name
  @method.name
end

#packageObject



25
26
27
# File 'lib/appmap/trace.rb', line 25

def package
  @package.name
end

#source_locationObject



15
16
17
# File 'lib/appmap/trace.rb', line 15

def source_location
  @method.source_location
end