Class: Copilot::CanvasLifecycleContext
- Inherits:
-
Struct
- Object
- Struct
- Copilot::CanvasLifecycleContext
- Defined in:
- lib/copilot/types.rb
Overview
Context provided for canvas lifecycle events.
Instance Attribute Summary collapse
-
#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.
-
#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
#canvas_id ⇒ Object
Returns the value of attribute canvas_id
171 172 173 |
# File 'lib/copilot/types.rb', line 171 def canvas_id @canvas_id end |
#extension_id ⇒ Object
Returns the value of attribute extension_id
171 172 173 |
# File 'lib/copilot/types.rb', line 171 def extension_id @extension_id end |
#host ⇒ Object
Returns the value of attribute host
171 172 173 |
# File 'lib/copilot/types.rb', line 171 def host @host end |
#instance_id ⇒ Object
Returns the value of attribute instance_id
171 172 173 |
# File 'lib/copilot/types.rb', line 171 def instance_id @instance_id end |
#session_id ⇒ Object
Returns the value of attribute session_id
171 172 173 |
# File 'lib/copilot/types.rb', line 171 def session_id @session_id end |
Class Method Details
.from_hash(h) ⇒ Object
175 176 177 178 179 180 181 182 183 |
# File 'lib/copilot/types.rb', line 175 def self.from_hash(h) new( session_id: h["sessionId"], extension_id: h["extensionId"], canvas_id: h["canvasId"], instance_id: h["instanceId"], host: h["host"] && CanvasHostContext.from_hash(h["host"]) ) end |