Class: Castle::Commands::Lists::Create

Inherits:
Object
  • Object
show all
Defined in:
lib/castle/commands/lists/create.rb

Overview

Builds the command to create a list

Class Method Summary collapse

Class Method Details

.build(options = {}) ⇒ Castle::Command

Parameters:

  • options (Hash) (defaults to: {})

Returns:



12
13
14
15
16
# File 'lib/castle/commands/lists/create.rb', line 12

def build(options = {})
  Castle::Validators::Present.call(options, %i[name color primary_field])

  Castle::Command.new('lists', options, :post)
end