Class: Appwrite::Models::FrameworkAdapter

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key:, install_command:, build_command:, output_directory:, fallback_file:) ⇒ FrameworkAdapter

Returns a new instance of FrameworkAdapter.



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/appwrite/models/framework_adapter.rb', line 12

def initialize(
    key:,
    install_command:,
    build_command:,
    output_directory:,
    fallback_file:
)
    @key = key
    @install_command = install_command
    @build_command = build_command
    @output_directory = output_directory
    @fallback_file = fallback_file
end

Instance Attribute Details

#build_commandObject (readonly)

Returns the value of attribute build_command.



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

def build_command
  @build_command
end

#fallback_fileObject (readonly)

Returns the value of attribute fallback_file.



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

def fallback_file
  @fallback_file
end

#install_commandObject (readonly)

Returns the value of attribute install_command.



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

def install_command
  @install_command
end

#keyObject (readonly)

Returns the value of attribute key.



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

def key
  @key
end

#output_directoryObject (readonly)

Returns the value of attribute output_directory.



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

def output_directory
  @output_directory
end

Class Method Details

.from(map:) ⇒ Object



26
27
28
29
30
31
32
33
34
# File 'lib/appwrite/models/framework_adapter.rb', line 26

def self.from(map:)
    FrameworkAdapter.new(
        key: map["key"],
        install_command: map["installCommand"],
        build_command: map["buildCommand"],
        output_directory: map["outputDirectory"],
        fallback_file: map["fallbackFile"]
    )
end

Instance Method Details

#to_mapObject



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

def to_map
    {
        "key": @key,
        "installCommand": @install_command,
        "buildCommand": @build_command,
        "outputDirectory": @output_directory,
        "fallbackFile": @fallback_file
    }
end