Class: Inspec::Resources::UserGroups
- Inherits:
-
Array
- Object
- Array
- Inspec::Resources::UserGroups
- Defined in:
- lib/inspec/resources/users.rb
Overview
Class defined to compare for groups without case-sensitivity
Instance Method Summary collapse
- #include?(group) ⇒ Boolean
-
#initialize(user_groups) ⇒ UserGroups
constructor
A new instance of UserGroups.
Constructor Details
#initialize(user_groups) ⇒ UserGroups
Returns a new instance of UserGroups.
390 391 392 393 |
# File 'lib/inspec/resources/users.rb', line 390 def initialize(user_groups) @user_groups = user_groups super end |
Instance Method Details
#include?(group) ⇒ Boolean
395 396 397 |
# File 'lib/inspec/resources/users.rb', line 395 def include?(group) !(@user_groups.select { |user_group| user_group.casecmp?(group) }.empty?) end |