Class: Inspec::Resources::Members
- Inherits:
-
Array
- Object
- Array
- Inspec::Resources::Members
- Defined in:
- lib/inspec/resources/groups.rb
Overview
Class defined to check for members without case-sensitivity
Instance Method Summary collapse
- #include?(user) ⇒ Boolean
-
#initialize(group_members) ⇒ Members
constructor
A new instance of Members.
Constructor Details
#initialize(group_members) ⇒ Members
Returns a new instance of Members.
27 28 29 30 |
# File 'lib/inspec/resources/groups.rb', line 27 def initialize(group_members) @group_members = group_members super end |
Instance Method Details
#include?(user) ⇒ Boolean
32 33 34 |
# File 'lib/inspec/resources/groups.rb', line 32 def include?(user) !(@group_members.select { |group_member| group_member.casecmp?(user) }.empty?) end |