class PortaText::Command::Api::Acl
The acl endpoint. github.com/PortaText/docs/wiki/REST-API#api_acl
- Author
-
Marcelo Gornstein (marcelog@portatext.com)
- Copyright
-
Copyright © 2015
PortaText
- License
-
Apache-2.0
Public Instance Methods
add(ip, netmask = 32, description = '')
click to toggle source
# File lib/portatext/command/api/acl.rb, line 11 def add(ip, netmask = 32, description = '') key = "#{ip}#{netmask}" set key, ip: ip, netmask: netmask, description: description end
body(method)
click to toggle source
Calls superclass method
# File lib/portatext/command/api/acl.rb, line 16 def body(method) return super if method.eql? :get { acl: @args.values }.to_json end
endpoint(_method)
click to toggle source
# File lib/portatext/command/api/acl.rb, line 21 def endpoint(_method) 'acl' end