class Fog::Compute::Linode::StackScripts
Public Instance Methods
all()
click to toggle source
# File lib/fog/linode/models/compute/stack_scripts.rb, line 10 def all load stackscripts end
get(id)
click to toggle source
# File lib/fog/linode/models/compute/stack_scripts.rb, line 14 def get(id) new stackscripts(id).first rescue Fog::Compute::Linode::NotFound nil end
Private Instance Methods
map_stackscript(script)
click to toggle source
# File lib/fog/linode/models/compute/stack_scripts.rb, line 25 def map_stackscript(script) script = script.each_with_object({}) { |(k, v), h| h[k.downcase.to_sym] = v } script.merge! :id => script[:stackscriptid], :name => script[:label] end
stackscripts(id=nil)
click to toggle source
# File lib/fog/linode/models/compute/stack_scripts.rb, line 21 def stackscripts(id=nil) service.stackscript_list(id).body['DATA'].map { |script| map_stackscript script } end