Class: Lego::Either::Fail
- Inherits:
-
Object
- Object
- Lego::Either::Fail
- Includes:
- Eitherish
- Defined in:
- lib/lego/either.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
Instance Method Summary collapse
- #error? ⇒ Boolean
-
#initialize(error) ⇒ Fail
constructor
A new instance of Fail.
- #inspect ⇒ Object
Methods included from Eitherish
Constructor Details
#initialize(error) ⇒ Fail
Returns a new instance of Fail.
75 76 77 |
# File 'lib/lego/either.rb', line 75 def initialize(error) @error = error end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
79 80 81 |
# File 'lib/lego/either.rb', line 79 def error @error end |
Instance Method Details
#inspect ⇒ Object
85 86 87 |
# File 'lib/lego/either.rb', line 85 def inspect "<Lego::Either::Fail '#{error}'>" end |