Class: LibvirtAsync::Implementations
- Inherits:
-
Object
- Object
- LibvirtAsync::Implementations
- Includes:
- WithDbg
- Defined in:
- lib/libvirt_async/implementations.rb
Instance Method Summary collapse
-
#initialize ⇒ Implementations
constructor
A new instance of Implementations.
- #inspect ⇒ Object
- #print_debug_info ⇒ Object
- #start ⇒ Object
- #stop ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ Implementations
Returns a new instance of Implementations.
13 14 15 16 17 |
# File 'lib/libvirt_async/implementations.rb', line 13 def initialize dbg { "#{self.class}#initialize" } default_variables end |
Instance Method Details
#inspect ⇒ Object
51 52 53 |
# File 'lib/libvirt_async/implementations.rb', line 51 def inspect to_s end |
#print_debug_info ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/libvirt_async/implementations.rb', line 34 def print_debug_info str = [ "#{self.class}:0x#{object_id.to_s(16)}", "handles = [", @handles.map(&:to_s).join("\n"), "]", "timers = [", @timers.map(&:to_s).join("\n"), "]" ].join("\n") LibvirtAsync.logger&.debug { str } end |
#start ⇒ Object
19 20 21 22 23 |
# File 'lib/libvirt_async/implementations.rb', line 19 def start dbg { "#{self.class}#start" } register_implementations end |
#stop ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'lib/libvirt_async/implementations.rb', line 25 def stop dbg { "#{self.class}#stop" } @handles.each(&:unregister) @timers.each(&:unregister) default_variables end |
#to_s ⇒ Object
47 48 49 |
# File 'lib/libvirt_async/implementations.rb', line 47 def to_s "#<#{self.class}:0x#{object_id.to_s(16)} handles=#{@handles} timers=#{@timers}>" end |