Class: Steep::Subtyping::Result::Failure

Inherits:
Base show all
Defined in:
lib/steep/subtyping/result.rb

Defined Under Namespace

Classes: BlockMismatchError, LoopAbort, MethodMissingError, ParameterMismatchError, PolyMethodSubtyping, SelfBindingMismatch, UnknownPairError, UnsatisfiedConstraints

Instance Attribute Summary collapse

Attributes inherited from Base

#relation

Instance Method Summary collapse

Methods inherited from Base

#else, #failure?, #then

Constructor Details

#initialize(relation, error) ⇒ Failure

Returns a new instance of Failure.



280
281
282
283
# File 'lib/steep/subtyping/result.rb', line 280

def initialize(relation, error)
  super relation
  @error = error
end

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error.



278
279
280
# File 'lib/steep/subtyping/result.rb', line 278

def error
  @error
end

Instance Method Details

#failure_path(path = []) ⇒ Object



289
290
291
292
# File 'lib/steep/subtyping/result.rb', line 289

def failure_path(path = [])
  path.unshift(self)
  path
end

#success?Boolean

Returns:

  • (Boolean)


285
286
287
# File 'lib/steep/subtyping/result.rb', line 285

def success?
  false
end