Class: Fastly::ACLEntry

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

Overview

Acces Control List Entry configuration

Instance Attribute Summary collapse

Attributes inherited from Base

#fetcher

Class Method Summary collapse

Methods inherited from Base

#as_hash, #delete!, #initialize, path, #require_api_key!, #save!

Constructor Details

This class inherits a constructor from Fastly::Base

Instance Attribute Details

#acl_idObject

Returns the value of attribute acl_id.



6
7
8
# File 'lib/fastly/acl_entry.rb', line 6

def acl_id
  @acl_id
end

#commentObject

Returns the value of attribute comment.



6
7
8
# File 'lib/fastly/acl_entry.rb', line 6

def comment
  @comment
end

#idObject

Returns the value of attribute id.



6
7
8
# File 'lib/fastly/acl_entry.rb', line 6

def id
  @id
end

#ipObject

Returns the value of attribute ip.



6
7
8
# File 'lib/fastly/acl_entry.rb', line 6

def ip
  @ip
end

#negatedObject

Returns the value of attribute negated.



6
7
8
# File 'lib/fastly/acl_entry.rb', line 6

def negated
  @negated
end

#service_idObject

Returns the value of attribute service_id.



6
7
8
# File 'lib/fastly/acl_entry.rb', line 6

def service_id
  @service_id
end

#subnetObject

Returns the value of attribute subnet.



6
7
8
# File 'lib/fastly/acl_entry.rb', line 6

def subnet
  @subnet
end

Class Method Details

.delete_path(object) ⇒ Object



45
46
47
# File 'lib/fastly/acl_entry.rb', line 45

def self.delete_path(object)
  put_path(object)
end

.get_path(service_id, acl_id, id) ⇒ Object

:attr: comment

A descriptive note.



33
34
35
# File 'lib/fastly/acl_entry.rb', line 33

def self.get_path(service_id, acl_id, id)
  "/service/#{service_id}/acl/#{acl_id}/entry/#{CGI.escape(id)}"
end

.list_path(opts = {}) ⇒ Object



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

def self.list_path(opts = {})
  "/service/#{opts[:service_id]}/acl/#{opts[:acl_id]}/entries"
end

.pluralizeObject



57
58
59
# File 'lib/fastly/acl_entry.rb', line 57

def self.pluralize
  'acl_entries'
end

.post_path(opts) ⇒ Object



37
38
39
# File 'lib/fastly/acl_entry.rb', line 37

def self.post_path(opts)
  "/service/#{opts[:service_id]}/acl/#{opts[:acl_id]}/entry"
end

.put_path(object) ⇒ Object



41
42
43
# File 'lib/fastly/acl_entry.rb', line 41

def self.put_path(object)
  get_path(object.service_id, object.acl_id, object.id)
end

.singularizeObject



53
54
55
# File 'lib/fastly/acl_entry.rb', line 53

def self.singularize
  'acl_entry'
end