Class: Ecoportal::API::GraphQL::Payload::LocationStructure::Draft::AddCommands

Inherits:
Create show all
Defined in:
lib/ecoportal/api/graphql/payload/location_structure/draft/add_commands.rb

Direct Known Subclasses

DropBadCommands

Constant Summary

Constants included from Common::GraphQL::Model::Diffable

Common::GraphQL::Model::Diffable::DIFF_CLASS

Instance Method Summary collapse

Methods inherited from Logic::Payload

#success?

Methods included from Common::GraphQL::Model::AsInput

#as_input

Methods included from Common::GraphQL::Model::Diffable

#as_update, #dirty?

Instance Method Details

#error?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/ecoportal/api/graphql/payload/location_structure/draft/add_commands.rb', line 14

def error?
  super || !ok?
end

#error_docObject



18
19
20
21
22
23
# File 'lib/ecoportal/api/graphql/payload/location_structure/draft/add_commands.rb', line 18

def error_doc
  err_doc = super
  return err_doc if err_doc

  { ok: ok } unless ok?
end

#ok?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/ecoportal/api/graphql/payload/location_structure/draft/add_commands.rb', line 10

def ok?
  ok != false
end