12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/omnifocus_mcp/tools/generators/remove_item.rb', line 12
def generate_apple_script(params = nil, **kwargs)
merge_params(params, kwargs).then do |params|
params = Params::McpBoundary.coerce(Params::RemoveItemParams, params)
return missing_identifier_error if Utils::Blank.blank?(params.id, params.name)
id = Infrastructure::AppleScript.escape(params.id.to_s)
name = Infrastructure::AppleScript.escape(params.name.to_s)
item_type = params.item_type.to_s
Infrastructure::AppleScript.tell_document(document_body(item_type:, id:, name:))
end
end
|