class ValueSemantics::Struct

ValueSemantics equivalent of the Struct class from the Ruby standard library

Public Class Methods

new(&block) click to toggle source

Creates a new Class with ValueSemantics mixed in

@yield a block containing ValueSemantics DSL @return [Class] the newly created class

# File lib/value_semantics/struct.rb, line 13
def self.new(&block)
  klass = Class.new
  klass.include(ValueSemantics.for_attributes(&block))
  klass
end