Module: IrbCompat

Defined in:
lib/attribute_struct/irb_compat.rb

Overview

Helper methods for IRB interactions

Instance Method Summary collapse

Instance Method Details

#inspectString

Returns object inspection

Returns:

  • (String)

    object inspection



5
6
7
# File 'lib/attribute_struct/irb_compat.rb', line 5

def inspect
  "<[#{self._klass}:#{@table.object_id}] - table: #{@table.inspect}>"
end

#to_sString

Returns string of instance

Returns:

  • (String)

    string of instance



10
11
12
# File 'lib/attribute_struct/irb_compat.rb', line 10

def to_s
  "<#{self._klass}:#{@table.object_id}>"
end