Class: Fastly::VCL
- Inherits:
-
BelongsToServiceAndVersion
- Object
- Base
- BelongsToServiceAndVersion
- Fastly::VCL
- Defined in:
- lib/fastly/vcl.rb
Overview
An internal representation of a Varnish Configuration Language file
Instance Attribute Summary collapse
-
#comment ⇒ Object
Returns the value of attribute comment.
-
#content ⇒ Object
Returns the value of attribute content.
-
#main ⇒ Object
Returns the value of attribute main.
-
#name ⇒ Object
Returns the value of attribute name.
-
#service_id ⇒ Object
Returns the value of attribute service_id.
Attributes inherited from Base
Instance Method Summary collapse
-
#set_main! ⇒ Object
Set VCL as main VCL.
Methods inherited from BelongsToServiceAndVersion
#as_hash, #service, #version, #version=, #version_number
Methods inherited from Base
#as_hash, #delete!, delete_path, get_path, #initialize, list_path, path, post_path, put_path, #save!
Constructor Details
This class inherits a constructor from Fastly::Base
Instance Attribute Details
#comment ⇒ Object
Returns the value of attribute comment.
4 5 6 |
# File 'lib/fastly/vcl.rb', line 4 def comment @comment end |
#content ⇒ Object
Returns the value of attribute content.
4 5 6 |
# File 'lib/fastly/vcl.rb', line 4 def content @content end |
#main ⇒ Object
Returns the value of attribute main.
4 5 6 |
# File 'lib/fastly/vcl.rb', line 4 def main @main end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/fastly/vcl.rb', line 4 def name @name end |
#service_id ⇒ Object
Returns the value of attribute service_id.
4 5 6 |
# File 'lib/fastly/vcl.rb', line 4 def service_id @service_id end |
Instance Method Details
#set_main! ⇒ Object
Set VCL as main VCL
45 46 47 48 |
# File 'lib/fastly/vcl.rb', line 45 def set_main! hash = fetcher.client.put("/service/#{service.id}/version/#{version_number}/vcl/#{name}/main") !hash.nil? end |