Sha256: 6b342b394b7ef8a5947c2502044e96454fd24fc5ad0f5521d4a90eb6ae55cccb
Contents?: true
Size: 606 Bytes
Versions: 6
Compression:
Stored size: 606 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 "<li#{animation_class}>#{text}</li>" 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
6 entries across 6 versions & 1 rubygems