Class: StaticTracing::Tracepoint
- Inherits:
-
Object
- Object
- StaticTracing::Tracepoint
- Defined in:
- lib/ruby-static-tracing/tracepoint.rb
Overview
:nodoc:
Defined Under Namespace
Classes: InvalidArgType, InvalidArgumentError
Constant Summary collapse
- VALID_ARGS_TYPES =
[Integer, String]
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
Instance Method Summary collapse
- #enabled? ⇒ Boolean
- #fire(*values) ⇒ Object
-
#initialize(provider, name, *args) ⇒ Tracepoint
constructor
A new instance of Tracepoint.
Constructor Details
#initialize(provider, name, *args) ⇒ Tracepoint
Returns a new instance of Tracepoint.
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/ruby-static-tracing/tracepoint.rb', line 23 def initialize(provider, name, *args) @provider = provider @name = name validate_args(args) @args = args if StaticTracing::Platform.supported_platform? tracepoint_initialize(provider, name, args) else StaticTracing.issue_disabled_tracepoints_warning end end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
21 22 23 |
# File 'lib/ruby-static-tracing/tracepoint.rb', line 21 def args @args end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
21 22 23 |
# File 'lib/ruby-static-tracing/tracepoint.rb', line 21 def name @name end |
#provider ⇒ Object (readonly)
Returns the value of attribute provider.
21 22 23 |
# File 'lib/ruby-static-tracing/tracepoint.rb', line 21 def provider @provider end |
Instance Method Details
#enabled? ⇒ Boolean
43 44 |
# File 'lib/ruby-static-tracing/tracepoint.rb', line 43 def enabled? end |
#fire(*values) ⇒ Object
36 37 38 39 40 41 |
# File 'lib/ruby-static-tracing/tracepoint.rb', line 36 def fire(*values) values.each_with_index do |arg, i| raise InvalidArgumentError.new(arg, args[i]) unless arg.is_a?(args[i]) end _fire_tracepoint(values) end |