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, #save!

Constructor Details

This class inherits a constructor from Fastly::Base

Instance Attribute Details

#service_idObject

Returns the value of attribute service_id.



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

def service_id
  @service_id
end

#settingsObject

Returns the value of attribute settings.



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

def settings
  @settings
end

#versionObject

Returns the value of attribute version.



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

def version
  @version
end

Class Method Details

.delete_pathObject

:nodoc:



44
45
46
# File 'lib/fastly/settings.rb', line 44

def self.delete_path
  raise "You can't DELETE to an setting"
end

.get_path(service, number) ⇒ Object

:nodoc:



24
25
26
# File 'lib/fastly/settings.rb', line 24

def self.get_path(service, number)
  "/service/#{service}/version/#{number}/settings"
end

.list_path(opts = {}) ⇒ Object

:nodoc:



34
35
36
# File 'lib/fastly/settings.rb', line 34

def self.list_path(opts={})
  nil
end

.post_pathObject

:nodoc:



39
40
41
# File 'lib/fastly/settings.rb', line 39

def self.post_path 
  raise "You can't POST to an setting"
end

.put_path(obj) ⇒ Object

:nodoc:



29
30
31
# File 'lib/fastly/settings.rb', line 29

def self.put_path(obj)
  get_path(obj.service_id, obj.version)
end

Instance Method Details

#as_hashObject

:nodoc:



54
55
56
# File 'lib/fastly/settings.rb', line 54

def as_hash 
  settings
end

#delete!Object

:nodoc:



49
50
51
# File 'lib/fastly/settings.rb', line 49

def delete!
  raise "You can't delete an invoice"
end