encoding: UTF-8
# File app/helpers/application_helper.rb, line 26
26: def camelCaseString phrase
27: phrase.gsub!(/^[a-z]|\s+[a-z]/) { |a| a.upcase }
28: return phrase
29: end
# File app/helpers/application_helper.rb, line 17
17: def get_album_info album, artist
18: @result = LastFM::Album.getInfo(album, artist)
19: @result.album
20: end
# File app/helpers/application_helper.rb, line 22
22: def trimString str, length
23: truncate str, :length => length.to_i, :omission => "…"
24: end
# File app/helpers/application_helper.rb, line 4
4: def validate_img_url image, type, size
5: @attr = (type=="gallery") ? "name" : "size"
6: image.each do |img|
7: if img[@attr] == size.to_s
8: if img["#text"].blank?
9: return "/images/placeholder/#{type.to_s}.png"
10: end
11: return img["#text"]
12: end
13: end
14:
15: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.