Class: Philiprehberger::RegexLib::Result
- Inherits:
-
Object
- Object
- Philiprehberger::RegexLib::Result
- Defined in:
- lib/philiprehberger/regex_lib.rb
Overview
Result object returned by validate
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
Instance Method Summary collapse
-
#initialize(valid:, error: nil) ⇒ Result
constructor
A new instance of Result.
- #valid? ⇒ Boolean
Constructor Details
#initialize(valid:, error: nil) ⇒ Result
Returns a new instance of Result.
14 15 16 17 |
# File 'lib/philiprehberger/regex_lib.rb', line 14 def initialize(valid:, error: nil) @valid = valid @error = error end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
12 13 14 |
# File 'lib/philiprehberger/regex_lib.rb', line 12 def error @error end |
Instance Method Details
#valid? ⇒ Boolean
19 20 21 |
# File 'lib/philiprehberger/regex_lib.rb', line 19 def valid? @valid end |