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



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

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