Class: OKF::Registry::Group
- Inherits:
-
Object
- Object
- OKF::Registry::Group
- Defined in:
- lib/okf/registry.rb
Overview
A named set of bundle sources: a unique slug and an ordered list of
members (bundle or group slugs), stored normalized. A group has no path
— it resolves, recursively, to the bundles its members name. It shares the
slug namespace with Entry: a slug names one or the other, never both, so
@backend is unambiguous. Only okf search/okf server consume one — the
two verbs that already take several bundles.
A plain class, not a Struct like Entry: the field we want is members, and
Struct.new(:slug, :members) would shadow Struct#members (the field-name
introspection) — the gotcha Lint/StructNewOverride flags. This keeps
group.members as the natural accessor without the override.
Instance Attribute Summary collapse
-
#members ⇒ Object
Returns the value of attribute members.
-
#slug ⇒ Object
Returns the value of attribute slug.
Instance Method Summary collapse
-
#initialize(slug, members) ⇒ Group
constructor
A new instance of Group.
Constructor Details
#initialize(slug, members) ⇒ Group
Returns a new instance of Group.
52 53 54 55 |
# File 'lib/okf/registry.rb', line 52 def initialize(slug, members) @slug = slug @members = members end |
Instance Attribute Details
#members ⇒ Object
Returns the value of attribute members.
50 51 52 |
# File 'lib/okf/registry.rb', line 50 def members @members end |
#slug ⇒ Object
Returns the value of attribute slug.
50 51 52 |
# File 'lib/okf/registry.rb', line 50 def slug @slug end |