Class: Fastly::Settings

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

Overview

Represent arbitary key value settings for a given Version

Instance Attribute Summary collapse

Attributes inherited from Base

#fetcher

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize, path, #require_api_key!, #save!

Constructor Details

This class inherits a constructor from Fastly::Base

Instance Attribute Details

#service_idObject

Returns the value of attribute service_id.



5
6
7
# File 'lib/fastly/settings.rb', line 5

def service_id
  @service_id
end

#settingsObject

Returns the value of attribute settings.



5
6
7
# File 'lib/fastly/settings.rb', line 5

def settings
  @settings
end

#versionObject

Returns the value of attribute version.



5
6
7
# File 'lib/fastly/settings.rb', line 5

def version
  @version
end

Class Method Details

.delete_pathObject

: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_pathObject

: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_hashObject

: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