123456789_123456789_123456789_123456789_123456789_

Class: ACL::ACLList

Relationships & Source Files
Inherits: Object
Defined in: lib/drb/acl.rb

Overview

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

Class Method Summary

Instance Method Summary

Constructor Details

.newACLList

Creates an empty ACLList

[ GitHub ]

  
# File 'lib/drb/acl.rb', line 122

def initialize
  @list = []
end

Instance Method Details

#add(str)

Adds str as an ACLEntry in this list

[ GitHub ]

  
# File 'lib/drb/acl.rb', line 143

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

#match(addr)

Matches addr against each ACLEntry in this list.

[ GitHub ]

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

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