Class: Logic::Result
- Inherits:
-
Object
- Object
- Logic::Result
- Defined in:
- lib/logick.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#output ⇒ Object
Returns the value of attribute output.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #fail? ⇒ Boolean
-
#initialize(atts) ⇒ Result
constructor
A new instance of Result.
- #success? ⇒ Boolean
Constructor Details
#initialize(atts) ⇒ Result
Returns a new instance of Result.
11 12 13 14 15 |
# File 'lib/logick.rb', line 11 def initialize(atts) @type = atts[:type] @output = atts[:output] @errors = atts[:errors] end |
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors.
9 10 11 |
# File 'lib/logick.rb', line 9 def errors @errors end |
#output ⇒ Object
Returns the value of attribute output.
9 10 11 |
# File 'lib/logick.rb', line 9 def output @output end |
#type ⇒ Object
Returns the value of attribute type.
9 10 11 |
# File 'lib/logick.rb', line 9 def type @type end |
Instance Method Details
#fail? ⇒ Boolean
21 22 23 |
# File 'lib/logick.rb', line 21 def fail? @type == :fail end |
#success? ⇒ Boolean
17 18 19 |
# File 'lib/logick.rb', line 17 def success? @type == :success end |