Module: Qt::Inspectable
- Defined in:
- lib/qt/inspectable.rb
Overview
Common object inspection formatting for Qt wrapper instances.
Instance Method Summary collapse
- #q_inspect ⇒ Object (also: #qt_inspect, #to_h)
- #q_inspect_property_values ⇒ Object
Instance Method Details
#q_inspect ⇒ Object Also known as: qt_inspect, to_h
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/qt/inspectable.rb', line 16 def q_inspect { qt_class: self.class::QT_CLASS, ruby_class: self.class.name, handle: @handle, qt_methods: self.class::QT_API_QT_METHODS, ruby_methods: self.class::QT_API_RUBY_METHODS, properties: q_inspect_property_values } end |
#q_inspect_property_values ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/qt/inspectable.rb', line 6 def q_inspect_property_values property_values = {} self.class::QT_API_PROPERTIES.each do |property| property_values[property] = public_send(property) rescue StandardError => e property_values[property] = { error: e.class.name, message: e. } end property_values end |