Sha256: e1897104672dc719cf070cc0a095c54044701aaface484c61b5451fb41dfc3f0

Contents?: true

Size: 540 Bytes

Versions: 2

Compression:

Stored size: 540 Bytes

Contents

module Squall
  # OnApp Template
  class Template < Base
    # Public: Lists available templates.
    #
    # Returns an Array.
    def list
      response = request(:get, '/templates.json')
      response.collect { |temp| temp['image_template'] }
    end

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
squall-1.4.0 lib/squall/template.rb
squall-1.3.1 lib/squall/template.rb