Class: Squall::Template
Overview
OnApp Template
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary (collapse)
-
- (Object) list
Lists available templates.
-
- (Object) make_public(id)
Make a Template public so that it can be downloaded via a HTTP URL.
Methods inherited from Base
#check_config, #default_params, #key_for_class, #request
Instance Method Details
- (Object) list
Lists available templates.
7 8 9 10 |
# File 'lib/squall/template.rb', line 7 def list response = request(:get, '/templates.json') response.collect { |temp| temp['image_template'] } end |
- (Object) make_public(id)
Make a Template public so that it can be downloaded via a HTTP URL.
18 19 20 21 |
# File 'lib/squall/template.rb', line 18 def make_public(id) response = request(:post, "/templates/#{id}/make_public.json") response.first[1] end |