Class: Fastly::Settings
Overview
Represent arbitary key value settings for a given Version
Instance Attribute Summary collapse
-
#service_id ⇒ Object
Returns the value of attribute service_id.
-
#settings ⇒ Object
Returns the value of attribute settings.
-
#version ⇒ Object
Returns the value of attribute version.
Attributes inherited from Base
Class Method Summary collapse
-
.delete_path ⇒ Object
:nodoc:.
-
.get_path(service, number) ⇒ Object
:nodoc:.
-
.list_path(_opts = {}) ⇒ Object
:nodoc:.
-
.post_path ⇒ Object
:nodoc:.
-
.put_path(obj) ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#as_hash ⇒ Object
:nodoc:.
-
#delete! ⇒ Object
:nodoc:.
Methods inherited from Base
#initialize, path, #require_api_key!, #save!
Constructor Details
This class inherits a constructor from Fastly::Base
Instance Attribute Details
#service_id ⇒ Object
Returns the value of attribute service_id.
5 6 7 |
# File 'lib/fastly/settings.rb', line 5 def service_id @service_id end |
#settings ⇒ Object
Returns the value of attribute settings.
5 6 7 |
# File 'lib/fastly/settings.rb', line 5 def settings @settings end |
#version ⇒ Object
Returns the value of attribute version.
5 6 7 |
# File 'lib/fastly/settings.rb', line 5 def version @version end |
Class Method Details
.delete_path ⇒ Object
:nodoc:
45 46 47 |
# File 'lib/fastly/settings.rb', line 45 def self.delete_path fail "You can't DELETE to an setting" end |
.get_path(service, number) ⇒ Object
:nodoc:
25 26 27 |
# File 'lib/fastly/settings.rb', line 25 def self.get_path(service, number) "/service/#{service}/version/#{number}/settings" end |
.list_path(_opts = {}) ⇒ Object
:nodoc:
35 36 37 |
# File 'lib/fastly/settings.rb', line 35 def self.list_path(_opts = {}) nil end |
.post_path ⇒ Object
:nodoc:
40 41 42 |
# File 'lib/fastly/settings.rb', line 40 def self.post_path fail "You can't POST to an setting" end |
.put_path(obj) ⇒ Object
:nodoc:
30 31 32 |
# File 'lib/fastly/settings.rb', line 30 def self.put_path(obj) get_path(obj.service_id, obj.version) end |
Instance Method Details
#as_hash ⇒ Object
:nodoc:
55 56 57 |
# File 'lib/fastly/settings.rb', line 55 def as_hash settings end |
#delete! ⇒ Object
:nodoc:
50 51 52 |
# File 'lib/fastly/settings.rb', line 50 def delete! fail "You can't delete an invoice" end |