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.
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/ruby-static-tracing/tracepoint.rb', line 13 def initialize(provider, name, *args) @provider = provider @name = name validate_args(args) @args = args if StaticTracing::Platform.linux? 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.
11 12 13 |
# File 'lib/ruby-static-tracing/tracepoint.rb', line 11 def args @args end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
11 12 13 |
# File 'lib/ruby-static-tracing/tracepoint.rb', line 11 def name @name end |
#provider ⇒ Object (readonly)
Returns the value of attribute provider.
11 12 13 |
# File 'lib/ruby-static-tracing/tracepoint.rb', line 11 def provider @provider end |
Instance Method Details
#enabled? ⇒ Boolean
32 33 |
# File 'lib/ruby-static-tracing/tracepoint.rb', line 32 def enabled? end |
#fire(*values) ⇒ Object
26 27 28 29 30 |
# File 'lib/ruby-static-tracing/tracepoint.rb', line 26 def fire(*values) values.each_with_index do |arg, i| raise InvalidArgumentError unless arg.is_a?(args[i]) end end |