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.



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

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

Instance Method Details

#entriesObject

returns the group object



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

def entries
  @filter
end

#gidsObject

only return gids



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

def gids
  @parent.gids(@filter)
end

#groupsObject

only returns group name



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

def groups
  @parent.groups(@filter)
end

#usersObject

only returns users



157
158
159
# File 'lib/inspec/resources/etc_group.rb', line 157

def users
  @parent.users(@filter)
end