class Mon::Contract::Future

Public Instance Methods

valid?(val) click to toggle source
# File lib/contracts/future.rb, line 20
def valid?(val)
  # Should be a Future, and if finalized it should satisfy
  # the provided contract. Note: We can't know if an inflight
  # contract will satisfy type or not.
  val.is_a?(Mon::M::Future) and (val.is_a?(Mon::M::FutureComplete).implies(valid_nested_contract?(val._)))
end