Module: ValueStruct::Core

Defined in:
lib/value_struct/core.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(struct) ⇒ Object



6
7
8
9
10
11
# File 'lib/value_struct/core.rb', line 6

def self.included(struct)
  struct.send(:undef_method, "[]=".to_sym)
  struct.members.each do |member|
    struct.send(:undef_method, "#{member}=".to_sym)
  end
end

Instance Method Details

#inspectObject



2
3
4
# File 'lib/value_struct/core.rb', line 2

def inspect
  super.to_s.sub('struct', 'ValueStruct')
end