Class: Packwerk::Validator::Result
- Inherits:
-
Object
- Object
- Packwerk::Validator::Result
- Defined in:
- lib/packwerk/validator/result.rb
Instance Attribute Summary collapse
- #error_value ⇒ Object readonly
- #ok ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(ok:, error_value: nil) ⇒ Result
constructor
A new instance of Result.
- #ok? ⇒ Boolean
Constructor Details
#initialize(ok:, error_value: nil) ⇒ Result
Returns a new instance of Result.
14 15 16 17 |
# File 'lib/packwerk/validator/result.rb', line 14 def initialize(ok:, error_value: nil) @ok = ok @error_value = error_value end |
Instance Attribute Details
#error_value ⇒ Object (readonly)
11 12 13 |
# File 'lib/packwerk/validator/result.rb', line 11 def error_value @error_value end |
#ok ⇒ Object (readonly)
8 9 10 |
# File 'lib/packwerk/validator/result.rb', line 8 def ok @ok end |
Instance Method Details
#ok? ⇒ Boolean
20 21 22 |
# File 'lib/packwerk/validator/result.rb', line 20 def ok? ok end |