Class: Gracefully::Failure
- Inherits:
-
Object
- Object
- Gracefully::Failure
- Defined in:
- lib/gracefully/try.rb
Class Method Summary collapse
Instance Method Summary collapse
- #get ⇒ Object
-
#initialize(error) ⇒ Failure
constructor
A new instance of Failure.
- #or_else(other) ⇒ Object
Constructor Details
#initialize(error) ⇒ Failure
Returns a new instance of Failure.
57 58 59 |
# File 'lib/gracefully/try.rb', line 57 def initialize(error) @error = error end |
Class Method Details
.with(error) ⇒ Object
53 54 55 |
# File 'lib/gracefully/try.rb', line 53 def self.with(error) new error end |