Sha256: 235a1bd198cf496b89c606aa0be8dcc5ffd1796b26f124cd8cb5c5733271e711

Contents?: true

Size: 504 Bytes

Versions: 4

Compression:

Stored size: 504 Bytes

Contents

module Squall
  # OnApp Template
  class Template < Base
    # Return a list of available Templates
    def list
      response = request(:get, '/templates.json')
      response.collect { |temp| temp['image_template'] }
    end

    # Make a Template public so that it can be downloaded
    # via a HTTP url
    #
    # ==== Params
    #
    # * +id*+ - ID of template
    def make_public(id)
      response = request(:post, "/templates/#{id}/make_public.json")
      response.first[1]
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
squall-1.3.0 lib/squall/template.rb
squall-1.2.1beta1 lib/squall/template.rb
squall-1.2.0beta1 lib/squall/template.rb
squall-1.1.0 lib/squall/template.rb