Sha256: f881ba1f080693102e7ab339370f2b39815b0f26ac5dc7c162ad1c5a50632ef3

Contents?: true

Size: 607 Bytes

Versions: 9

Compression:

Stored size: 607 Bytes

Contents

# -*- encoding: UTF-8 -*-
require 'ostruct'

module CSD
  module Extensions
    module Core
      # This module comprises extensions to OpenStruct.
      #
      module OpenStruct
        
        # Deletes all attributes of this OpenStruct instance.
        #
        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
        
      end
    end
  end
end

class Object #:nodoc:
  include CSD::Extensions::Core::OpenStruct
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
csd-0.1.17 lib/csd/extensions/core/open_struct.rb
csd-0.1.16 lib/csd/extensions/core/open_struct.rb
csd-0.1.15 lib/csd/extensions/core/open_struct.rb
csd-0.1.14 lib/csd/extensions/core/open_struct.rb
csd-0.1.13 lib/csd/extensions/core/open_struct.rb
csd-0.1.12 lib/csd/extensions/core/open_struct.rb
csd-0.1.11 lib/csd/extensions/core/open_struct.rb
csd-0.1.10 lib/csd/extensions/core/open_struct.rb
csd-0.1.9 lib/csd/extensions/core/open_struct.rb