Sha256: d745bfe0803933a1d11348435d4b78a17a6a8babb2bb992e06afa3ec8621351a

Contents?: true

Size: 594 Bytes

Versions: 2

Compression:

Stored size: 594 Bytes

Contents

module SlideHero
  class ListPoint
    include Compilable
    alias_method :to_s, :compile
    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 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.11 lib/slide_hero/list_point.rb
slide_hero-0.0.10 lib/slide_hero/list_point.rb