Class: E2B::Models::TemplateTagInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/e2b/models/template_tag_info.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(build_id:, tags:) ⇒ TemplateTagInfo

Returns a new instance of TemplateTagInfo.



15
16
17
18
# File 'lib/e2b/models/template_tag_info.rb', line 15

def initialize(build_id:, tags:)
  @build_id = build_id
  @tags = tags || []
end

Instance Attribute Details

#build_idObject (readonly)

Returns the value of attribute build_id.



6
7
8
# File 'lib/e2b/models/template_tag_info.rb', line 6

def build_id
  @build_id
end

#tagsObject (readonly)

Returns the value of attribute tags.



6
7
8
# File 'lib/e2b/models/template_tag_info.rb', line 6

def tags
  @tags
end

Class Method Details

.from_hash(data) ⇒ Object



8
9
10
11
12
13
# File 'lib/e2b/models/template_tag_info.rb', line 8

def self.from_hash(data)
  new(
    build_id: data["buildID"] || data["build_id"] || data[:buildID],
    tags: data["tags"] || data[:tags] || []
  )
end