Class: ACL::ACLList

Inherits:
Object
  • Object
show all
Defined in:
lib/drb/acl.rb

Overview

A list of ACLEntry objects. Used to implement the allow and deny halves of an ACL

Instance Method Summary collapse

Constructor Details

#initializeACLList

Creates an empty ACLList


129
130
131
# File 'lib/drb/acl.rb', line 129

def initialize
  @list = []
end

Instance Method Details

#add(str) ⇒ Object

Adds str as an ACLEntry in this list


150
151
152
# File 'lib/drb/acl.rb', line 150

def add(str)
  @list.push(ACLEntry.new(str))
end

#match(addr) ⇒ Object

Matches addr against each ACLEntry in this list.


138
139
140
141
142
143
# File 'lib/drb/acl.rb', line 138

def match(addr)
  @list.each do |e|
    return true if e.match(addr)
  end
  false
end