# File lib/fog/linode/models/compute/stack_scripts.rb, line 10 def all load stackscripts end
# 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
# 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
# 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