Class: Appwrite::Models::Runtime

Inherits:
Object
  • Object
show all
Defined in:
lib/appwrite/models/runtime.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, key:, name:, version:, base:, image:, logo:, supports:) ⇒ Runtime

Returns a new instance of Runtime.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/appwrite/models/runtime.rb', line 15

def initialize(
    id:,
    key:,
    name:,
    version:,
    base:,
    image:,
    logo:,
    supports:
)
    @id = id
    @key = key
    @name = name
    @version = version
    @base = base
    @image = image
    @logo = 
    @supports = supports
end

Instance Attribute Details

#baseObject (readonly)

Returns the value of attribute base.



10
11
12
# File 'lib/appwrite/models/runtime.rb', line 10

def base
  @base
end

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/appwrite/models/runtime.rb', line 6

def id
  @id
end

#imageObject (readonly)

Returns the value of attribute image.



11
12
13
# File 'lib/appwrite/models/runtime.rb', line 11

def image
  @image
end

#keyObject (readonly)

Returns the value of attribute key.



7
8
9
# File 'lib/appwrite/models/runtime.rb', line 7

def key
  @key
end

#logoObject (readonly)

Returns the value of attribute logo.



12
13
14
# File 'lib/appwrite/models/runtime.rb', line 12

def 
  @logo
end

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/appwrite/models/runtime.rb', line 8

def name
  @name
end

#supportsObject (readonly)

Returns the value of attribute supports.



13
14
15
# File 'lib/appwrite/models/runtime.rb', line 13

def supports
  @supports
end

#versionObject (readonly)

Returns the value of attribute version.



9
10
11
# File 'lib/appwrite/models/runtime.rb', line 9

def version
  @version
end

Class Method Details

.from(map:) ⇒ Object



35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/appwrite/models/runtime.rb', line 35

def self.from(map:)
    Runtime.new(
        id: map["$id"],
        key: map["key"],
        name: map["name"],
        version: map["version"],
        base: map["base"],
        image: map["image"],
        logo: map["logo"],
        supports: map["supports"]
    )
end

Instance Method Details

#to_mapObject



48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/appwrite/models/runtime.rb', line 48

def to_map
    {
        "$id": @id,
        "key": @key,
        "name": @name,
        "version": @version,
        "base": @base,
        "image": @image,
        "logo": @logo,
        "supports": @supports
    }
end