Sha256: 5f9a832fc30fd490f8a3a0bc9409987f7856626f7f2ff894e87d08e461737aa7
Contents?: true
Size: 696 Bytes
Versions: 33
Compression:
Stored size: 696 Bytes
Contents
module PortaText module Command module Api # The acl endpoint. # https://github.com/PortaText/docs/wiki/REST-API#api_acl # # Author:: Marcelo Gornstein (mailto:marcelog@portatext.com) # Copyright:: Copyright (c) 2015 PortaText # License:: Apache-2.0 class Acl < Base def add(ip, netmask = 32, description = '') key = "#{ip}#{netmask}" set key, ip: ip, netmask: netmask, description: description end def body(method) return super if method.eql? :get { acl: @args.values }.to_json end def endpoint(_method) 'acl' end end end end end
Version data entries
33 entries across 33 versions & 1 rubygems