Class: Ecoportal::API::GraphQL::Logic::Connection

Inherits:
BaseModel show all
Includes:
Enumerable
Defined in:
lib/ecoportal/api/graphql/logic/connection.rb

Defined Under Namespace

Classes: GenericNode

Constant Summary

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

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

Instance Method Summary collapse

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

#as_input

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

#as_update, #dirty?

Instance Method Details

#each(&block) ⇒ Object



25
26
27
28
29
# File 'lib/ecoportal/api/graphql/logic/connection.rb', line 25

def each(&block)
  return to_enum(:each) unless block

  nodes.each(&block)
end

#empty?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/ecoportal/api/graphql/logic/connection.rb', line 21

def empty?
  count < 1
end