class EacRubyUtils::ActsAsImmutable::HashAccessor

def apply_singular(klass)

def apply_singular(klass)
  accessor = self
  klass.send(:define_method, name) do |*args|
    case args.count
    when 1 then next accessor.immutable_value_get_single(self, args[0])
    when 2 then next accessor.immutable_value_set_single(self, *args[0..1])
    else
      raise ::ArgumentError, "wrong number of arguments (given #{args.count}, expected 1..2)"
    end
  end
end