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.
230 231 232 233 234 235 236 237 |
# File 'lib/git/lighttp.rb', line 230 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
243 244 245 246 247 |
# File 'lib/git/lighttp.rb', line 243 def groups(username) @handler.group.select do |_group, members| members.include? username end.keys end |
#members(group) ⇒ Object
239 240 241 |
# File 'lib/git/lighttp.rb', line 239 def members(group) @handler.members(group) end |