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