Class: Copilot::CanvasActionContext
- Inherits:
-
Struct
- Object
- Struct
- Copilot::CanvasActionContext
- Defined in:
- lib/copilot/types.rb
Overview
Context provided when a canvas action is invoked.
Instance Attribute Summary collapse
-
#action_name ⇒ Object
Returns the value of attribute action_name.
-
#canvas_id ⇒ Object
Returns the value of attribute canvas_id.
-
#extension_id ⇒ Object
Returns the value of attribute extension_id.
-
#host ⇒ Object
Returns the value of attribute host.
-
#input ⇒ Object
Returns the value of attribute input.
-
#instance_id ⇒ Object
Returns the value of attribute instance_id.
-
#session_id ⇒ Object
Returns the value of attribute session_id.
Class Method Summary collapse
Instance Attribute Details
#action_name ⇒ Object
Returns the value of attribute action_name
153 154 155 |
# File 'lib/copilot/types.rb', line 153 def action_name @action_name end |
#canvas_id ⇒ Object
Returns the value of attribute canvas_id
153 154 155 |
# File 'lib/copilot/types.rb', line 153 def canvas_id @canvas_id end |
#extension_id ⇒ Object
Returns the value of attribute extension_id
153 154 155 |
# File 'lib/copilot/types.rb', line 153 def extension_id @extension_id end |
#host ⇒ Object
Returns the value of attribute host
153 154 155 |
# File 'lib/copilot/types.rb', line 153 def host @host end |
#input ⇒ Object
Returns the value of attribute input
153 154 155 |
# File 'lib/copilot/types.rb', line 153 def input @input end |
#instance_id ⇒ Object
Returns the value of attribute instance_id
153 154 155 |
# File 'lib/copilot/types.rb', line 153 def instance_id @instance_id end |
#session_id ⇒ Object
Returns the value of attribute session_id
153 154 155 |
# File 'lib/copilot/types.rb', line 153 def session_id @session_id end |
Class Method Details
.from_hash(h) ⇒ Object
157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/copilot/types.rb', line 157 def self.from_hash(h) new( session_id: h["sessionId"], extension_id: h["extensionId"], canvas_id: h["canvasId"], instance_id: h["instanceId"], action_name: h["actionName"], input: h["input"], host: h["host"] && CanvasHostContext.from_hash(h["host"]) ) end |