Class: Trackler::Specifications
- Inherits:
-
Object
- Object
- Trackler::Specifications
- Includes:
- Enumerable
- Defined in:
- lib/trackler/specifications.rb
Overview
Specifications is the collection of problems that we have metadata for.
Instance Attribute Summary collapse
-
#root ⇒ Object
readonly
Returns the value of attribute root.
Instance Method Summary collapse
-
#-(slugs) ⇒ Object
rubocop:disable Style/OpMethod.
- #[](slug) ⇒ Object
- #each ⇒ Object
-
#initialize(root) ⇒ Specifications
constructor
A new instance of Specifications.
Constructor Details
#initialize(root) ⇒ Specifications
Returns a new instance of Specifications.
7 8 9 |
# File 'lib/trackler/specifications.rb', line 7 def initialize(root) @root = root end |
Instance Attribute Details
#root ⇒ Object (readonly)
Returns the value of attribute root.
6 7 8 |
# File 'lib/trackler/specifications.rb', line 6 def root @root end |
Instance Method Details
#-(slugs) ⇒ Object
rubocop:disable Style/OpMethod
22 23 24 |
# File 'lib/trackler/specifications.rb', line 22 def -(slugs) (by_slug.keys - slugs).sort end |
#[](slug) ⇒ Object
17 18 19 |
# File 'lib/trackler/specifications.rb', line 17 def [](slug) by_slug[slug] end |
#each ⇒ Object
11 12 13 14 15 |
# File 'lib/trackler/specifications.rb', line 11 def each active.each do |specification| yield specification end end |