Class: SmartCore::Operation::Result::Error Private
- Defined in:
- lib/smart_core/operation/result/error.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Classes: Case, Code, Context, Set
Instance Attribute Summary collapse
Instance Method Summary collapse
- #each_error(&block) ⇒ void
- #error? {|SmartCore::Operation::Result::Error| ... } ⇒ Boolean
- #error_codes ⇒ Array<String|Symbol|Any>
- #error_context ⇒ Hash<String|Symbol,Any>
Methods inherited from Basic
#callback?, #failure?, #fatal?, #initialize, #success?
Constructor Details
This class inherits a constructor from SmartCore::Operation::Result::Basic
Instance Attribute Details
#errors ⇒ SmartCore::Operation::Result::Error::Set (readonly)
15 16 17 |
# File 'lib/smart_core/operation/result/error.rb', line 15 def errors @errors end |
Instance Method Details
#each_error(&block) ⇒ void
This method returns an undefined value.
46 47 48 |
# File 'lib/smart_core/operation/result/error.rb', line 46 def each_error(&block) errors.each(&block) end |
#error? {|SmartCore::Operation::Result::Error| ... } ⇒ Boolean
22 23 24 |
# File 'lib/smart_core/operation/result/error.rb', line 22 def error? true.tap { yield(self) if block_given? } end |
#error_codes ⇒ Array<String|Symbol|Any>
30 31 32 |
# File 'lib/smart_core/operation/result/error.rb', line 30 def error_codes errors.codes end |
#error_context ⇒ Hash<String|Symbol,Any>
38 39 40 |
# File 'lib/smart_core/operation/result/error.rb', line 38 def error_context errors.context end |