Sha256: 3e06155c8c62a5d1b5aace835bee232a99bee9848375b2a87e3a26367bc71fc5

Contents?: true

Size: 574 Bytes

Versions: 2

Compression:

Stored size: 574 Bytes

Contents

module SlideHero
  class ListPoint
    attr_reader :animation, :text
    SUPPORTED_ANIMATIONS = %w{grow shrink roll-in fade-out 
      highlight-red highlight-green highlight-blue}

    def initialize(text, options={})
      @text = text
      @animation = options[:animation]
    end

    def to_s
      text
    end

    def animation_class
      if animation
        animation_markup = ' class="fragment ' 
        if SUPPORTED_ANIMATIONS.include? animation
          animation_markup << animation 
        end
        animation_markup + "\""
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
slide_hero-0.0.3 lib/slide_hero/list_point.rb
slide_hero-0.0.2 lib/slide_hero/list_point.rb