Module: ValueStruct::Immutable

Defined in:
lib/value_struct/immutable.rb

Class Method Summary collapse

Class Method Details

.included(struct) ⇒ Object



2
3
4
5
6
7
# File 'lib/value_struct/immutable.rb', line 2

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