class
UI::AppShortcut
- UI::AppShortcut
- Reference
- Object
Overview
A single shortcut declaration.
This is intentionally a metadata object, not a rendered view. It packages the user-facing title, phrases, and parameters that a host app can later export into AppIntents or a similar integration layer.
Defined in:
ui/app_shortcuts.crConstructors
Instance Method Summary
- #add_parameter(name : String, prompt : String | Nil = nil, type : String | Nil = nil, default_value : String | Nil = nil, is_required : Bool = true) : AppShortcutParameter
- #add_phrase(phrase : String) : String
- #app_intent_description : String | Nil
- #app_intent_display_name : String
- #app_intent_struct_name : String
- #app_shortcut_spec_name : String
- #export_app_intents_scaffold(indent : String = " ") : String
- #export_app_shortcut_spec(indent : String = " ") : String
- #icon : String | Nil
- #icon=(icon : String | Nil)
- #identifier : String
- #identifier=(identifier : String)
- #is_discoverable : Bool
- #is_discoverable=(is_discoverable : Bool)
- #is_enabled : Bool
- #is_enabled=(is_enabled : Bool)
- #parameters : Array(AppShortcutParameter)
- #parameters=(parameters : Array(AppShortcutParameter))
- #phrases : Array(String)
- #phrases=(phrases : Array(String))
- #subtitle : String | Nil
- #subtitle=(subtitle : String | Nil)
- #summary : String | Nil
- #summary=(summary : String | Nil)
- #title : String
- #title=(title : String)
- #to_payload(json : JSON::Builder) : Nil
Constructor Detail
def self.new(title : String, identifier : String | Nil = nil, subtitle : String | Nil = nil, summary : String | Nil = nil, icon : String | Nil = nil, phrases : Array(String) | Nil = nil, parameters : Array(AppShortcutParameter) | Nil = nil, is_enabled : Bool = true, is_discoverable : Bool = true)
#
Instance Method Detail
def add_parameter(name : String, prompt : String | Nil = nil, type : String | Nil = nil, default_value : String | Nil = nil, is_required : Bool = true) : AppShortcutParameter
#