Sha256: 820d795fcc307a05b21b1d5faf47cf5a6806b2bc71c9c3d208cec5a641ed5a87

Contents?: true

Size: 995 Bytes

Versions: 11

Compression:

Stored size: 995 Bytes

Contents

class Fastly
  # A logical group of directors - for example the asset server directors from all your DCNs
  class Origin < BelongsToServiceAndVersion
    attr_accessor :service_id, :name, :comment

    ## 
    # :attr: service_id
    # 
    # The id of the service this belongs to.
    # 

    ## 
    # :attr: version
    # 
    # The number of the version this belongs to.
    # 

    ## 
    # :attr: name
    # 
    # The domain name of this domain
    
    
    # Add a Director object to an Origin
    #
    # Return true on success and false on failure
    def add_director(director) 
      hash = fetcher.client.post(Fastly::Origin.put_path(self)+"/director/#{director.name}")
      return !hash.nil?
    end
    
    # Delete a Director object from an Origin
    #
    # Return true on success and false on failure
    def delete_director(director) 
      hash = fetcher.client.delete(Fastly::Origin.put_path(self)+"/director/#{director.name}")
      return !hash.nil?
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
fastly-1.1.2 lib/fastly/origin.rb
fastly-1.1.1 lib/fastly/origin.rb
fastly-1.1.0 lib/fastly/origin.rb
fastly-1.01 lib/fastly/origin.rb
fastly-1.00 lib/fastly/origin.rb
fastly-0.99 lib/fastly/origin.rb
fastly-0.98 lib/fastly/origin.rb
fastly-0.97 lib/fastly/origin.rb
fastly-0.96 lib/fastly/origin.rb
fastly-0.95 lib/fastly/origin.rb
fastly-0.9 lib/fastly/origin.rb