lib/gruff/base.rb
# Finds the best background to render based on the provided theme options.
#
# Creates a @base_image to draw on.
Finds the best background to render based on the provided theme options.
Creates a @base_image to draw on.
Finds the best background to render based on the provided theme options . Creates a @base_image to draw on .
def render_background
      case @theme_options[:background_colors]
      when Array
        @base_image = render_gradiated_background(*@theme_options[:background_colors])
      when String
        @base_image = render_solid_background(@theme_options[:background_colors])
      else
        @base_image = render_image_background(*@theme_options[:background_image])
      end
    end
def render_background case @theme_options [ :background_colors ] when Array @base_image = render_gradiated_background ( * @theme_options [ :background_colors ] ) when String @base_image = render_solid_background ( @theme_options [ :background_colors ] ) else @base_image = render_image_background ( * @theme_options [ :background_image ] ) end end
Finds the best background to render based on the provided theme options.
Finds the best background to render based on the provided theme options .