module Gnucash::Support::LightInspect

Allows lightweight inspection os Gnucash models by avoiding fetch XML nodes.

Public Instance Methods

attributes() click to toggle source

Attributes available for inspection

@return [Array<Symbol>] Attributes used to build the inspection string

# File lib/gnucash/support/light_inspect.rb, line 9
def attributes
  []
end
inspect() click to toggle source

Custom implementation using only selected attributes.

@return [String] Stringified version of the object @see attributes

# File lib/gnucash/support/light_inspect.rb, line 17
def inspect
  inspection = attributes.map { |att| "#{att}: #{send(att)}" }.join(", ")
  "#<#{self.class} #{inspection}>"
end