Class: Fastly::DynamicSnippet

Inherits:
Base
  • Object
show all
Defined in:
lib/fastly/dynamic_snippet.rb

Overview

VCL Snippets are blocks of VCL logic inserted into your service’s configuration that don’t require custom VCL.

Instance Attribute Summary collapse

Attributes inherited from Base

#fetcher

Class Method Summary collapse

Methods inherited from Base

#as_hash, #delete!, delete_path, #initialize, list_path, path, post_path, #require_api_key!, #save!

Constructor Details

This class inherits a constructor from Fastly::Base

Instance Attribute Details

#contentObject

Returns the value of attribute content.



4
5
6
# File 'lib/fastly/dynamic_snippet.rb', line 4

def content
  @content
end

#service_idObject

Returns the value of attribute service_id.



4
5
6
# File 'lib/fastly/dynamic_snippet.rb', line 4

def service_id
  @service_id
end

#snippet_idObject

Returns the value of attribute snippet_id.



4
5
6
# File 'lib/fastly/dynamic_snippet.rb', line 4

def snippet_id
  @snippet_id
end

Class Method Details

.get_path(object) ⇒ Object

:attr: snippet_id

The ID of this dynamic snippet



23
24
25
# File 'lib/fastly/dynamic_snippet.rb', line 23

def self.get_path(object)
  "/service/#{object.service_id}/snippet/#{object.snippet_id}"
end

.put_path(object) ⇒ Object



27
28
29
# File 'lib/fastly/dynamic_snippet.rb', line 27

def self.put_path(object)
  get_path(object)
end