Class: Bsdkrun::AiSession
- Inherits:
-
Data
- Object
- Data
- Bsdkrun::AiSession
- Defined in:
- lib/bsdkrun/types.rb
Overview
One agent sandbox. It is a machine, so +logs+/+stop+ work on id.
Instance Attribute Summary collapse
-
#agent ⇒ Object
readonly
Returns the value of attribute agent.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#running ⇒ Object
readonly
Returns the value of attribute running.
-
#workspace ⇒ Object
readonly
Returns the value of attribute workspace.
Class Method Summary collapse
- .from_graphql(s) ⇒ AiSession (also: from_row)
Instance Attribute Details
#agent ⇒ Object (readonly)
Returns the value of attribute agent
186 187 188 |
# File 'lib/bsdkrun/types.rb', line 186 def agent @agent end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at
186 187 188 |
# File 'lib/bsdkrun/types.rb', line 186 def created_at @created_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id
186 187 188 |
# File 'lib/bsdkrun/types.rb', line 186 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name
186 187 188 |
# File 'lib/bsdkrun/types.rb', line 186 def name @name end |
#running ⇒ Object (readonly)
Returns the value of attribute running
186 187 188 |
# File 'lib/bsdkrun/types.rb', line 186 def running @running end |
#workspace ⇒ Object (readonly)
Returns the value of attribute workspace
186 187 188 |
# File 'lib/bsdkrun/types.rb', line 186 def workspace @workspace end |
Class Method Details
.from_graphql(s) ⇒ AiSession Also known as: from_row
191 192 193 194 195 196 197 198 199 200 |
# File 'lib/bsdkrun/types.rb', line 191 def self.from_graphql(s) new( id: s["id"].to_s, name: s["name"].to_s, agent: s["agent"].to_s, running: !!s["running"], workspace: s["workspace"], created_at: (s["createdAt"] || s["created_at"]).to_i ) end |