Class: Fog::Scaleway::Compute::Bootscripts

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/scaleway/models/compute/bootscripts.rb

Instance Method Summary collapse

Instance Method Details

#allObject



7
8
9
10
# File 'lib/fog/scaleway/models/compute/bootscripts.rb', line 7

def all
  bootscripts = service.list_bootscripts.body['bootscripts'] || []
  load(bootscripts)
end

#get(identity) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/fog/scaleway/models/compute/bootscripts.rb', line 12

def get(identity)
  if (bootscript = service.get_bootscript(identity).body['bootscript'])
    new(bootscript)
  end
rescue Fog::Scaleway::Compute::UnknownResource
  nil
end