Class: Daytona::Resources

Inherits:
Object
  • Object
show all
Defined in:
lib/daytona/common/resources.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cpu: nil, memory: nil, disk: nil, gpu: nil) ⇒ Resources



21
22
23
24
25
26
# File 'lib/daytona/common/resources.rb', line 21

def initialize(cpu: nil, memory: nil, disk: nil, gpu: nil)
  @cpu = cpu
  @memory = memory
  @disk = disk
  @gpu = gpu
end

Instance Attribute Details

#cpuInteger? (readonly)



6
7
8
# File 'lib/daytona/common/resources.rb', line 6

def cpu
  @cpu
end

#diskInteger? (readonly)



12
13
14
# File 'lib/daytona/common/resources.rb', line 12

def disk
  @disk
end

#gpuInteger? (readonly)



15
16
17
# File 'lib/daytona/common/resources.rb', line 15

def gpu
  @gpu
end

#memoryInteger? (readonly)



9
10
11
# File 'lib/daytona/common/resources.rb', line 9

def memory
  @memory
end

Instance Method Details

#to_hHash



29
# File 'lib/daytona/common/resources.rb', line 29

def to_h = { cpu:, memory:, disk:, gpu: }.compact