class Dry::Struct::Value

{Value} objects behave like {Struct}s but *deeply frozen* using [`ice_nine`](github.com/dkubb/ice_nine)

@example

class Location < Dry::Struct::Value
  attribute :lat, Types::Float
  attribute :lng, Types::Float
end

loc1 = Location.new(lat: 1.23, lng: 4.56)
loc2 = Location.new(lat: 1.23, lng: 4.56)

loc1.frozen? #=> true
loc2.frozen? #=> true
loc1 == loc2 #=> true

@see github.com/dkubb/ice_nine

Public Class Methods

new(*) click to toggle source

@param (see ClassInterface#new) @return [Value] @see github.com/dkubb/ice_nine

Calls superclass method
# File lib/dry/struct/value.rb, line 33
def self.new(*)
  ::IceNine.deep_freeze(super)
end