Class: Inspec::Resources::EtcGroupView

Inherits:
Object
  • Object
show all
Defined in:
lib/inspec/resources/etc_group.rb

Overview

object that hold a specifc view on etc group

Instance Method Summary collapse

Constructor Details

#initialize(parent, filter) ⇒ EtcGroupView

Returns a new instance of EtcGroupView.



132
133
134
135
# File 'lib/inspec/resources/etc_group.rb', line 132

def initialize(parent, filter)
  @parent = parent
  @filter = filter
end

Instance Method Details

#entriesObject

returns the group object



138
139
140
# File 'lib/inspec/resources/etc_group.rb', line 138

def entries
  @filter
end

#gidsObject

only return gids



148
149
150
# File 'lib/inspec/resources/etc_group.rb', line 148

def gids
  @parent.gids(@filter)
end

#groupsObject

only returns group name



143
144
145
# File 'lib/inspec/resources/etc_group.rb', line 143

def groups
  @parent.groups(@filter)
end

#usersObject

only returns users



153
154
155
# File 'lib/inspec/resources/etc_group.rb', line 153

def users
  @parent.users(@filter)
end