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

Inherits:
Base::Model show all
Defined in:
lib/ecoportal/api/graphql/input/location_structure/apply_commands.rb

Instance Method Summary collapse

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

#as_input

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

#as_update

Instance Method Details

#add(type, **kargs) ⇒ Object



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

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