struct DppmRestApi::Config::GroupView
- DppmRestApi::Config::GroupView
- Struct
- Value
- Object
Overview
A Group
view of an User
, used to retrieve groups associated to an user.
Defined in:
config/group_view.crConstructors
Instance Method Summary
-
#each_group(&) : Nil
Yields each Group to the block for which the user is a member of.
-
#find_group?(&)
Yield each group to a block and return the first group for which the block returns a truthy value
- #groups : Array(Group)
-
#map_groups(&block : Group -> R) forall R
yields each Group that the user is a member of to the block, and returns an Iterator of the results of the block.
- #user : User
Constructor Detail
Instance Method Detail
Yield each group to a block and return the first group for which the block returns a truthy value
yields each Group that the user is a member of to the block, and returns an Iterator of the results of the block. Important: if the result of the block is nil, it will be ignored (i.e. not a member of the resulting array) -- hence the resulting array can be of a different size than the number of groups of which this user is a member.