Class: Castle::Commands::ListItems::Create
- Inherits:
-
Object
- Object
- Castle::Commands::ListItems::Create
- Defined in:
- lib/castle/commands/list_items/create.rb
Overview
Builds the command to create a list item
Class Method Summary collapse
Class Method Details
.build(options = {}) ⇒ Castle::Command
11 12 13 14 15 16 17 |
# File 'lib/castle/commands/list_items/create.rb', line 11 def build( = {}) Castle::Validators::Present.call(, %i[list_id author primary_value]) list_id = .delete(:list_id) Castle::Command.new("lists/#{list_id}/items", , :post) end |