Class: E2B::Models::BuildInfo
- Inherits:
-
Object
- Object
- E2B::Models::BuildInfo
- Defined in:
- lib/e2b/models/build_info.rb
Instance Attribute Summary collapse
-
#alias_name ⇒ Object
readonly
Returns the value of attribute alias_name.
-
#build_id ⇒ Object
readonly
Returns the value of attribute build_id.
-
#build_step_origins ⇒ Object
readonly
Returns the value of attribute build_step_origins.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#template_id ⇒ Object
readonly
Returns the value of attribute template_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(alias_name:, name:, tags:, template_id:, build_id:, build_step_origins: []) ⇒ BuildInfo
constructor
A new instance of BuildInfo.
Constructor Details
#initialize(alias_name:, name:, tags:, template_id:, build_id:, build_step_origins: []) ⇒ BuildInfo
Returns a new instance of BuildInfo.
19 20 21 22 23 24 25 26 |
# File 'lib/e2b/models/build_info.rb', line 19 def initialize(alias_name:, name:, tags:, template_id:, build_id:, build_step_origins: []) @alias_name = alias_name @name = name @tags = || [] @template_id = template_id @build_id = build_id @build_step_origins = Array(build_step_origins).compact end |
Instance Attribute Details
#alias_name ⇒ Object (readonly)
Returns the value of attribute alias_name.
6 7 8 |
# File 'lib/e2b/models/build_info.rb', line 6 def alias_name @alias_name end |
#build_id ⇒ Object (readonly)
Returns the value of attribute build_id.
6 7 8 |
# File 'lib/e2b/models/build_info.rb', line 6 def build_id @build_id end |
#build_step_origins ⇒ Object (readonly)
Returns the value of attribute build_step_origins.
6 7 8 |
# File 'lib/e2b/models/build_info.rb', line 6 def build_step_origins @build_step_origins end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/e2b/models/build_info.rb', line 6 def name @name end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
6 7 8 |
# File 'lib/e2b/models/build_info.rb', line 6 def @tags end |
#template_id ⇒ Object (readonly)
Returns the value of attribute template_id.
6 7 8 |
# File 'lib/e2b/models/build_info.rb', line 6 def template_id @template_id end |
Class Method Details
.from_hash(data) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/e2b/models/build_info.rb', line 8 def self.from_hash(data) new( alias_name: data["alias"] || data[:alias], name: data["name"] || data[:name], tags: data["tags"] || data[:tags] || [], template_id: data["templateID"] || data["template_id"] || data[:templateID], build_id: data["buildID"] || data["build_id"] || data[:buildID], build_step_origins: data["buildStepOrigins"] || data["build_step_origins"] || data[:buildStepOrigins] || [] ) end |