Class: Lyrics::Suggestion
- Inherits:
-
Object
- Object
- Lyrics::Suggestion
- Defined in:
- lib/lyrics/lyrics.rb
Instance Attribute Summary collapse
-
#artist ⇒ Object
readonly
Returns the value of attribute artist.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(artist, title, url) ⇒ Suggestion
constructor
A new instance of Suggestion.
- #to_s ⇒ Object
Constructor Details
#initialize(artist, title, url) ⇒ Suggestion
Returns a new instance of Suggestion.
155 156 157 158 159 |
# File 'lib/lyrics/lyrics.rb', line 155 def initialize( artist, title, url ) @artist = artist.clone().freeze() @title = title.clone().freeze() @url = url.clone.freeze() end |
Instance Attribute Details
#artist ⇒ Object (readonly)
Returns the value of attribute artist.
153 154 155 |
# File 'lib/lyrics/lyrics.rb', line 153 def artist @artist end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
153 154 155 |
# File 'lib/lyrics/lyrics.rb', line 153 def title @title end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
153 154 155 |
# File 'lib/lyrics/lyrics.rb', line 153 def url @url end |
Instance Method Details
#to_s ⇒ Object
161 162 163 |
# File 'lib/lyrics/lyrics.rb', line 161 def to_s() return "art: #{artist} | tit: #{title} | url: #{url}" end |