Module: CSD::Extensions::Core::OpenStruct

Included in:
Object
Defined in:
lib/csd/extensions/core/open_struct.rb

Overview

This module comprises extensions to OpenStruct.

Instance Method Summary collapse

Instance Method Details

#clearObject

Deletes all attributes of this OpenStruct instance.



13
14
15
16
17
# File 'lib/csd/extensions/core/open_struct.rb', line 13

def clear
  testmode = self.testmode # This is the only thing we would not like to overwrite. It indicates whether we are running our Test Suite or not.
  @table = {}
  self.testmode = testmode
end

#inspect_for_debugObject

A nicer version of inspect (it only removes the helptext attribute)



21
22
23
24
25
# File 'lib/csd/extensions/core/open_struct.rb', line 21

def inspect_for_debug
  result = self.dup
  result.helptext = nil
  result.inspect
end