class Speculation::NonconformingSpec
@private
Constants
- S
This is a Ruby translation of clojure.spec:
https://github.com/clojure/clojure/blob/master/src/clj/clojure/spec.clj
All credit belongs with Rich Hickey and contributors for their original work.
This is a Ruby translation of clojure.spec:
https://github.com/clojure/clojure/blob/master/src/clj/clojure/spec.clj
All credit belongs with Rich Hickey and contributors for their original work.
This is a Ruby translation of clojure.spec:
https://github.com/clojure/clojure/blob/master/src/clj/clojure/spec.clj
All credit belongs with Rich Hickey and contributors for their original work.
This is a Ruby translation of clojure.spec:
https://github.com/clojure/clojure/blob/master/src/clj/clojure/spec.clj
All credit belongs with Rich Hickey and contributors for their original work.
This is a Ruby translation of clojure.spec:
https://github.com/clojure/clojure/blob/master/src/clj/clojure/spec.clj
All credit belongs with Rich Hickey and contributors for their original work.
This is a Ruby translation of clojure.spec:
https://github.com/clojure/clojure/blob/master/src/clj/clojure/spec.clj
All credit belongs with Rich Hickey and contributors for their original work.
This is a Ruby translation of clojure.spec:
https://github.com/clojure/clojure/blob/master/src/clj/clojure/spec.clj
All credit belongs with Rich Hickey and contributors for their original work.
Public Class Methods
# File lib/speculation/spec/nonconforming_spec.rb, line 13 def initialize(spec, gen = nil) @spec = spec @gen = gen @delayed_spec = Concurrent::Delay.new { S.send(:specize, spec) } end
Public Instance Methods
# File lib/speculation/spec/nonconforming_spec.rb, line 19 def conform(value) ret = @delayed_spec.value!.conform(value) S.invalid?(ret) ? :"Speculation/invalid" : value end
# File lib/speculation/spec/nonconforming_spec.rb, line 29 def explain(path, via, inn, value) @delayed_spec.value!.explain(path, via, inn, value) end
# File lib/speculation/spec/nonconforming_spec.rb, line 37 def gen(overrides, path, rmap) @delayed_spec.value!.gen(overrides, path, rmap) end
# File lib/speculation/spec/nonconforming_spec.rb, line 25 def unform(value) value end
# File lib/speculation/spec/nonconforming_spec.rb, line 33 def with_gen(gen) self.class.new(@spec, gen) end