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 123

def initialize
  @list = []
end

Instance Method Details

#add(str)

Adds str as an ACLEntry in this list

[ GitHub ]

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

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 132

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