Class: Ecoportal::API::GraphQL::Base::LocationStructure::Draft::Structure

Inherits:
Interface::LocationStructure::Nodes show all
Defined in:
lib/ecoportal/api/graphql/base/location_structure/draft/structure.rb

Constant Summary

Constants included from Helpers::LocationsTree

Helpers::LocationsTree::RELEVANT_NODES_COUNT

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

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

Instance Method Summary collapse

Methods inherited from Interface::LocationStructure::Nodes

#treeify

Methods included from Helpers::LocationsTree

#treeify

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

#as_input

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

#as_update, #dirty?

Instance Method Details

#draftObject



26
27
28
29
30
# File 'lib/ecoportal/api/graphql/base/location_structure/draft/structure.rb', line 26

def draft
  return if _parent == self

  _parent
end

#draft?Boolean

Returns:

  • (Boolean)


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

def draft?
  true
end

#idObject



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

def id
  draft&.id
end

#nameObject



18
19
20
# File 'lib/ecoportal/api/graphql/base/location_structure/draft/structure.rb', line 18

def name
  draft&.name
end

#parent_structureObject



22
23
24
# File 'lib/ecoportal/api/graphql/base/location_structure/draft/structure.rb', line 22

def parent_structure
  draft&.parent_structure
end