Class: Trackler::Implementations
- Inherits:
-
Object
- Object
- Trackler::Implementations
- Includes:
- Enumerable
- Defined in:
- lib/trackler/implementations.rb
Overview
Implementations is a collection of exercises in a specific language track.
Instance Attribute Summary collapse
-
#repo ⇒ Object
readonly
Returns the value of attribute repo.
-
#root ⇒ Object
readonly
Returns the value of attribute root.
-
#slugs ⇒ Object
readonly
Returns the value of attribute slugs.
-
#track_id ⇒ Object
readonly
Returns the value of attribute track_id.
Instance Method Summary collapse
- #[](slug) ⇒ Object
- #each ⇒ Object
-
#initialize(track_id, repo, slugs, root) ⇒ Implementations
constructor
A new instance of Implementations.
Constructor Details
#initialize(track_id, repo, slugs, root) ⇒ Implementations
Returns a new instance of Implementations.
7 8 9 10 11 12 |
# File 'lib/trackler/implementations.rb', line 7 def initialize(track_id, repo, slugs, root) @track_id = track_id @repo = repo @slugs = slugs @root = root end |
Instance Attribute Details
#repo ⇒ Object (readonly)
Returns the value of attribute repo.
6 7 8 |
# File 'lib/trackler/implementations.rb', line 6 def repo @repo end |
#root ⇒ Object (readonly)
Returns the value of attribute root.
6 7 8 |
# File 'lib/trackler/implementations.rb', line 6 def root @root end |
#slugs ⇒ Object (readonly)
Returns the value of attribute slugs.
6 7 8 |
# File 'lib/trackler/implementations.rb', line 6 def slugs @slugs end |
#track_id ⇒ Object (readonly)
Returns the value of attribute track_id.
6 7 8 |
# File 'lib/trackler/implementations.rb', line 6 def track_id @track_id end |
Instance Method Details
#[](slug) ⇒ Object
20 21 22 |
# File 'lib/trackler/implementations.rb', line 20 def [](slug) by_slug[slug] end |
#each ⇒ Object
14 15 16 17 18 |
# File 'lib/trackler/implementations.rb', line 14 def each all.each do |implementation| yield implementation end end |