Class: Fastly::DynamicSnippet
- 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
-
#content ⇒ Object
Returns the value of attribute content.
-
#service_id ⇒ Object
Returns the value of attribute service_id.
-
#snippet_id ⇒ Object
Returns the value of attribute snippet_id.
Attributes inherited from Base
Class Method Summary collapse
-
.get_path(object) ⇒ Object
:attr: snippet_id.
- .put_path(object) ⇒ Object
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
#content ⇒ Object
Returns the value of attribute content.
4 5 6 |
# File 'lib/fastly/dynamic_snippet.rb', line 4 def content @content end |
#service_id ⇒ Object
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_id ⇒ Object
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 |