Class: Lyrics::Suggestion

Inherits:
Object
  • Object
show all
Defined in:
lib/lyrics/lyrics.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#artistObject (readonly)

Returns the value of attribute artist.



153
154
155
# File 'lib/lyrics/lyrics.rb', line 153

def artist
  @artist
end

#titleObject (readonly)

Returns the value of attribute title.



153
154
155
# File 'lib/lyrics/lyrics.rb', line 153

def title
  @title
end

#urlObject (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_sObject



161
162
163
# File 'lib/lyrics/lyrics.rb', line 161

def to_s()
	return "art: #{artist} | tit: #{title} | url: #{url}"
end