Class: Whoosh::Schema::Result
- Inherits:
-
Object
- Object
- Whoosh::Schema::Result
- Defined in:
- lib/whoosh/schema.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(data:, errors:) ⇒ Result
constructor
A new instance of Result.
- #success? ⇒ Boolean
Constructor Details
#initialize(data:, errors:) ⇒ Result
Returns a new instance of Result.
11 12 13 14 |
# File 'lib/whoosh/schema.rb', line 11 def initialize(data:, errors:) @data = data @errors = errors end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
9 10 11 |
# File 'lib/whoosh/schema.rb', line 9 def data @data end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
9 10 11 |
# File 'lib/whoosh/schema.rb', line 9 def errors @errors end |
Instance Method Details
#success? ⇒ Boolean
16 17 18 |
# File 'lib/whoosh/schema.rb', line 16 def success? @errors.empty? end |