Sha256: cf0b01116a2bb094c2dff0c43d0bdf06ac37fb094780bd95bcef852e4c27ad48

Contents?: true

Size: 947 Bytes

Versions: 11

Compression:

Stored size: 947 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("#{Origin.put_path(self)}/director/#{director.name}")
      !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("#{Origin.put_path(self)}/director/#{director.name}")
      !hash.nil?
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
fastly-1.5.0 lib/fastly/origin.rb
fastly-1.4.3 lib/fastly/origin.rb
fastly-1.4.2 lib/fastly/origin.rb
fastly-1.4.1 lib/fastly/origin.rb
fastly-1.4.0 lib/fastly/origin.rb
fastly-1.3.0 lib/fastly/origin.rb
fastly-1.2.3 lib/fastly/origin.rb
fastly-1.2.2 lib/fastly/origin.rb
fastly-1.2.1 lib/fastly/origin.rb
fastly-1.2.0 lib/fastly/origin.rb
fastly-1.1.5 lib/fastly/origin.rb