Class: ParamParam::Failure

Inherits:
Result
  • Object
show all
Defined in:
lib/param_param/result.rb

Overview

Describes failed result.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Result

#success?

Constructor Details

#initialize(error) ⇒ Failure

Returns a new instance of Failure.



38
39
40
# File 'lib/param_param/result.rb', line 38

def initialize(error)
  @error = error
end

Instance Attribute Details

#errorObject (readonly)

An error related to the failure.



36
37
38
# File 'lib/param_param/result.rb', line 36

def error
  @error
end

Instance Method Details

#failure?Boolean

Returns true.

Returns:

  • (Boolean)


43
44
45
# File 'lib/param_param/result.rb', line 43

def failure?
  true
end