### Home Classes Methods

### In Files

- app/helpers/application_helper.rb

### Methods

- #camelCaseString
- #get_album_info
- #trimString
- #validate_img_url

### Files

- README_FOR_APP

### Class Index

Quicksearch

- LastFM
- LastFM::Album
- LastFM::Artist
- LastFM::Chart
- LastFM::Request
- LastFM::Track
- LastFM::Validator
- DeviseAuth
- DeviseAuth::RegistrationsController
- DeviseAuth::SessionsController
- Users
- Users::OmniauthCallbacksController
- ApplicationController
- ApplicationHelper
- Artist
- ArtistsController
- ChartsController
- HomeController
- Playlist
- PlaylistsTracks
- RedisQueryable
- SearchController
- Track
- TracksController
- User
- UsersController
- UsersHelper
- YoutubeVideoRating

No matching classes.

# ApplicationHelper

encoding: UTF-8

### Public Instance Methods

camelCaseString(phrase) click to toggle source

        # 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

get_album_info(album, artist) click to toggle source

        # 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

trimString(str, length) click to toggle source

        # File app/helpers/application_helper.rb, line 22
    22:   def trimString str, length

    23:     truncate str, :length => length.to_i, :omission => "…"

    24:   end

validate_img_url(image, type, size) click to toggle source

        # 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.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.