Module: Sequent::Core::Helpers::StringSupport

Included in:
Event, ValueObject
Defined in:
lib/sequent/core/helpers/string_support.rb

Overview

You typically do not need to include this module in your classes. If you extend from Sequent::Core::ValueObject, Sequent::Core::Event or Sequent::Core::BaseCommand you will get this functionality for free.

Instance Method Summary collapse

Instance Method Details

#to_sObject



12
13
14
15
16
17
18
19
# File 'lib/sequent/core/helpers/string_support.rb', line 12

def to_s
  s = "#{self.class.name}: "
  instance_variables.each do |name|
    value = instance_variable_get(name.to_s)
    s += "#{name}=[#{value}], "
  end
  "{#{s.chomp(', ')}}"
end