Class: QueenCheck::Result
- Inherits:
-
Object
- Object
- QueenCheck::Result
- Defined in:
- lib/queencheck/result.rb
Instance Attribute Summary collapse
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
Instance Method Summary collapse
-
#initialize(properties, is_success, exception = nil) ⇒ Result
constructor
A new instance of Result.
- #is_exception? ⇒ Boolean
- #is_failure? ⇒ Boolean
- #is_success? ⇒ Boolean
Constructor Details
#initialize(properties, is_success, exception = nil) ⇒ Result
Returns a new instance of Result.
6 7 8 9 10 11 12 13 |
# File 'lib/queencheck/result.rb', line 6 def initialize(properties, is_success, exception = nil) @properties = properties @is_success = is_success == true unless exception.nil? @exception = exception @is_success = false end end |
Instance Attribute Details
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
14 15 16 |
# File 'lib/queencheck/result.rb', line 14 def properties @properties end |
Instance Method Details
#is_exception? ⇒ Boolean
18 |
# File 'lib/queencheck/result.rb', line 18 def is_exception?; !@exception.nil?; end |
#is_failure? ⇒ Boolean
17 |
# File 'lib/queencheck/result.rb', line 17 def is_failure?; !@is_success; end |
#is_success? ⇒ Boolean
16 |
# File 'lib/queencheck/result.rb', line 16 def is_success?; @is_success; end |