Class: LastfmPathFinder::Path
- Inherits:
-
Object
- Object
- LastfmPathFinder::Path
- Includes:
- Redis::Objects
- Defined in:
- lib/lastfm_path_finder/path.rb
Instance Attribute Summary collapse
-
#artist_from ⇒ Object
Returns the value of attribute artist_from.
-
#artist_to ⇒ Object
Returns the value of attribute artist_to.
-
#id ⇒ Object
Returns the value of attribute id.
Instance Method Summary collapse
- #found? ⇒ Boolean
-
#initialize(from, to) ⇒ Path
constructor
A new instance of Path.
Constructor Details
#initialize(from, to) ⇒ Path
Returns a new instance of Path.
11 12 13 14 15 |
# File 'lib/lastfm_path_finder/path.rb', line 11 def initialize from, to self.artist_from = from self.artist_to = to self.id = "#{artist_from.id}_#{artist_to.id}" end |
Instance Attribute Details
#artist_from ⇒ Object
Returns the value of attribute artist_from.
6 7 8 |
# File 'lib/lastfm_path_finder/path.rb', line 6 def artist_from @artist_from end |
#artist_to ⇒ Object
Returns the value of attribute artist_to.
6 7 8 |
# File 'lib/lastfm_path_finder/path.rb', line 6 def artist_to @artist_to end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/lastfm_path_finder/path.rb', line 5 def id @id end |
Instance Method Details
#found? ⇒ Boolean
17 18 19 |
# File 'lib/lastfm_path_finder/path.rb', line 17 def found? !artists.values.empty? end |