Class: Babeltrace2::BTInterrupter
- Inherits:
-
BTSharedObject
- Object
- BTObject
- BTSharedObject
- Babeltrace2::BTInterrupter
- Defined in:
- lib/babeltrace2/graph/interrupter.rb
Instance Attribute Summary
Attributes inherited from BTObject
Instance Method Summary collapse
-
#initialize(handle = nil, retain: true, auto_release: true) ⇒ BTInterrupter
constructor
A new instance of BTInterrupter.
- #is_set ⇒ Object (also: #set?)
- #reset ⇒ Object (also: #reset!)
- #set ⇒ Object (also: #set!)
Methods inherited from BTSharedObject
Methods inherited from BTObject
Constructor Details
#initialize(handle = nil, retain: true, auto_release: true) ⇒ BTInterrupter
Returns a new instance of BTInterrupter.
31 32 33 34 35 36 37 38 39 |
# File 'lib/babeltrace2/graph/interrupter.rb', line 31 def initialize(handle = nil, retain: true, auto_release: true) if handle super(handle, retain: retain, auto_release: auto_release) else handle = Babeltrace2.bt_interrupter_create() raise Babeltrace2.process_error if handle.null? super(handle) end end |
Instance Method Details
#is_set ⇒ Object Also known as: set?
51 52 53 |
# File 'lib/babeltrace2/graph/interrupter.rb', line 51 def is_set Babeltrace2.bt_interrupter_is_set(@handle) != BT_FALSE end |
#reset ⇒ Object Also known as: reset!
46 47 48 |
# File 'lib/babeltrace2/graph/interrupter.rb', line 46 def reset Babeltrace2.bt_interrupter_reset(@handle) end |
#set ⇒ Object Also known as: set!
41 42 43 |
# File 'lib/babeltrace2/graph/interrupter.rb', line 41 def set Babeltrace2.bt_interrupter_set(@handle) end |