Sha256: 37d8b3d7498423062884b48f3037df13f612cdbb10e288994c59151fe542f31e

Contents?: true

Size: 842 Bytes

Versions: 2

Compression:

Stored size: 842 Bytes

Contents

module Animoto
  module Styles

    ANIMOTO_ORIGINAL      = "original"
    WATERCOLOR_SEASHORE   = "mothers_day_2011"
    DUSK_RETREAT          = "elegance_12"
    VINTAGE_VOYAGE        = "vintage"
    COSMIC_TIDINGS        = "cosmic_tidings"
    WONDERLAND_OF_SNOW    = "wonderland_of_snow"
    THROUGH_THE_BLOSSOMS  = "valentines_day_2012_hands"

    DEPRECATED_NAMES = {
      :ORIGINAL         => :ANIMOTO_ORIGINAL,
      :MOTHERS_DAY_2011 => :WATERCOLOR_SEASHORE,
      :ELEGANCE         => :DUSK_RETREAT,
      :VINTAGE          => :VINTAGE_VOYAGE
    }

    def self.const_missing old_name
      if new_name = DEPRECATED_NAMES[old_name]
        warn("The style name \"#{old_name.to_s}\" is deprecated. Use \"#{new_name}\" instead.")
        const_set(old_name, const_get(new_name))
      else
        super
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
animoto-1.5.2 ./lib/animoto/styles.rb
animoto-1.5.1 ./lib/animoto/styles.rb