Class: Ecoportal::API::GraphQL::Interface::LocationStructure::Command

Inherits:
Logic::BaseModel show all
Defined in:
lib/ecoportal/api/graphql/interface/location_structure/command.rb

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

#keysObject



14
15
16
# File 'lib/ecoportal/api/graphql/interface/location_structure/command.rb', line 14

def keys
  (doc || {}).keys
end

#set_values(**kargs) ⇒ Object



18
19
20
21
22
23
24
# File 'lib/ecoportal/api/graphql/interface/location_structure/command.rb', line 18

def set_values(**kargs)
  kargs.each do |key, value|
    send(key, value) if respond_to?(key, true)
  end

  self
end

#target_idsObject



10
11
12
# File 'lib/ecoportal/api/graphql/interface/location_structure/command.rb', line 10

def target_ids
  (doc || {}).values_at(:nodeId, :newId, :id)
end