Class: Ecoportal::API::GraphQL::Input::LocationStructure::ApplyCommands

Inherits:
Logic::Input show all
Defined in:
lib/ecoportal/api/graphql/input/location_structure/apply_commands.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

#add(type, **kargs) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/ecoportal/api/graphql/input/location_structure/apply_commands.rb', line 12

def add(type, **kargs)
  if (command = new_command(type))
    command.set_values(**kargs) unless kargs.empty?
    yield(command) if block_given?
  end
  command
end