Class: Git::Lighttp::Htgroup
Overview
:nodoc:
Instance Method Summary collapse
- #groups(username) ⇒ Object
-
#initialize(file) {|_self| ... } ⇒ Htgroup
constructor
A new instance of Htgroup.
- #members(group) ⇒ Object
Constructor Details
#initialize(file) {|_self| ... } ⇒ Htgroup
Returns a new instance of Htgroup.
224 225 226 227 228 229 230 231 |
# File 'lib/git/lighttp.rb', line 224 def initialize(file) require "webrick/httpauth/htgroup" WEBrick::HTTPAuth::Htgroup.class_eval do attr_reader :group end @handler = WEBrick::HTTPAuth::Htgroup.new(file) yield self if block_given? end |
Instance Method Details
#groups(username) ⇒ Object
237 238 239 240 241 |
# File 'lib/git/lighttp.rb', line 237 def groups(username) @handler.group.select do |group, members| members.include? username end.keys end |
#members(group) ⇒ Object
233 234 235 |
# File 'lib/git/lighttp.rb', line 233 def members(group) @handler.members(group) end |