Class: W3cApi::Models::Groups
- Inherits:
-
Object
- Object
- W3cApi::Models::Groups
- Includes:
- Enumerable
- Defined in:
- lib/w3c_api/models/groups.rb
Overview
Collection wrapper for groups
Instance Attribute Summary collapse
-
#groups ⇒ Object
Returns the value of attribute groups.
Instance Method Summary collapse
- #each ⇒ Object
- #empty? ⇒ Boolean
- #first ⇒ Object
-
#initialize(groups = []) ⇒ Groups
constructor
A new instance of Groups.
- #size ⇒ Object
Constructor Details
#initialize(groups = []) ⇒ Groups
11 12 13 |
# File 'lib/w3c_api/models/groups.rb', line 11 def initialize(groups = []) @groups = groups end |
Instance Attribute Details
#groups ⇒ Object
Returns the value of attribute groups.
9 10 11 |
# File 'lib/w3c_api/models/groups.rb', line 9 def groups @groups end |
Instance Method Details
#each ⇒ Object
15 16 17 |
# File 'lib/w3c_api/models/groups.rb', line 15 def each(&) @groups.each(&) end |
#empty? ⇒ Boolean
27 28 29 |
# File 'lib/w3c_api/models/groups.rb', line 27 def empty? @groups.empty? end |
#first ⇒ Object
19 20 21 |
# File 'lib/w3c_api/models/groups.rb', line 19 def first @groups.first end |
#size ⇒ Object
23 24 25 |
# File 'lib/w3c_api/models/groups.rb', line 23 def size @groups.size end |