Module: Gnucash::Support::LightInspect
- Included in:
- Account, AccountTransaction, Book, Customer, Gnucash::Support, Transaction, Value
- Defined in:
- lib/gnucash/support/light_inspect.rb
Overview
Allows lightweight inspection os Gnucash models by avoiding fetch XML nodes.
Instance Method Summary collapse
-
#attributes ⇒ Array<Symbol>
Attributes available for inspection.
-
#inspect ⇒ String
Custom implementation using only selected attributes.
Instance Method Details
#attributes ⇒ Array<Symbol>
Attributes available for inspection
9 10 11 |
# File 'lib/gnucash/support/light_inspect.rb', line 9 def attributes [] end |
#inspect ⇒ String
Custom implementation using only selected attributes.
17 18 19 20 |
# File 'lib/gnucash/support/light_inspect.rb', line 17 def inspect inspection = attributes.map { |att| "#{att}: #{send(att)}" }.join(", ") "#<#{self.class} #{inspection}>" end |