Class: ImmutableStruct
- Inherits:
-
Object
- Object
- ImmutableStruct
- Defined in:
- lib/immutable_struct.rb
Constant Summary collapse
- VERSION =
'1.1.1'
Class Method Summary collapse
Class Method Details
.new(*attrs, &block) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/immutable_struct.rb', line 6 def self.new(*attrs, &block) struct = Struct.new(*attrs, &block) make_immutable!(struct) optionalize_constructor!(struct) extend_dup!(struct) struct end |