Class: Ecoportal::API::GraphQL::Payload::LocationStructure::CommandExecutionResult
- Inherits:
-
Logic::BaseModel
- Object
- Common::Content::DoubleModel
- Common::GraphQL::Model
- Logic::BaseModel
- Ecoportal::API::GraphQL::Payload::LocationStructure::CommandExecutionResult
- Includes:
- Error::LocationsError::FetchNested
- Defined in:
- lib/ecoportal/api/graphql/payload/location_structure/command_execution_result.rb
Constant Summary
Constants included from Common::GraphQL::Model::Diffable
Common::GraphQL::Model::Diffable::DIFF_CLASS
Instance Method Summary collapse
Methods included from Error::LocationsError::FetchNested
#loc_err_conflicting_ids, #loc_err_conflicting_ids?, #locations_error?, #locations_error_doc, #validationErrors, #validationErrors?
Methods included from Concerns::SnakeCamelAccess
#method_missing, #respond_to_missing?
Methods included from Common::GraphQL::Model::AsInput
Methods included from Common::GraphQL::Model::Diffable
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Ecoportal::API::GraphQL::Concerns::SnakeCamelAccess
Instance Method Details
#error? ⇒ Boolean
24 25 26 27 |
# File 'lib/ecoportal/api/graphql/payload/location_structure/command_execution_result.rb', line 24 def error? locations_error? || !ok? end |
#error_doc ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/ecoportal/api/graphql/payload/location_structure/command_execution_result.rb', line 29 def error_doc if locations_error? { locationsError: locations_error_doc } elsif !ok? { ok: ok } end.tap do |err_doc| next unless err_doc.is_a?(Hash) next if err_doc.empty? err_doc[:command] = command.doc end end |
#ok? ⇒ Boolean
16 17 18 |
# File 'lib/ecoportal/api/graphql/payload/location_structure/command_execution_result.rb', line 16 def ok? ok != false end |
#success? ⇒ Boolean
20 21 22 |
# File 'lib/ecoportal/api/graphql/payload/location_structure/command_execution_result.rb', line 20 def success? !error? end |