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 ⇒ Object
readonly
Returns the value of attribute track.
Instance Method Summary collapse
- #[](slug) ⇒ Object
- #each ⇒ Object
-
#initialize(repo, slugs, root, track) ⇒ Implementations
constructor
A new instance of Implementations.
- #length ⇒ Object (also: #size)
Constructor Details
#initialize(repo, slugs, root, track) ⇒ Implementations
Returns a new instance of Implementations.
7 8 9 10 11 12 |
# File 'lib/trackler/implementations.rb', line 7 def initialize(repo, slugs, root, track) @repo = repo @slugs = slugs @root = root @track = track 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 ⇒ Object (readonly)
Returns the value of attribute track.
6 7 8 |
# File 'lib/trackler/implementations.rb', line 6 def track @track 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 |
#length ⇒ Object Also known as: size
24 25 26 |
# File 'lib/trackler/implementations.rb', line 24 def length all.length end |