Sha256: 6b7b630a547a3625b2b3db92b7816ec6b5c89755ad3d10f3a9e7a8bfe6e1aafc
Contents?: true
Size: 760 Bytes
Versions: 2
Compression:
Stored size: 760 Bytes
Contents
module SlideHero class List attr_reader :style def initialize(style=:unordered, &block) @style = style instance_eval(&block) end def compile gem_path = Gem.loaded_specs['slide_hero'].full_gem_path if style == :unordered Tilt::ERBTemplate.new(File.join(gem_path, 'lib/slide_hero/views/unordered_list.html.erb')).render(self) else Tilt::ERBTemplate.new(File.join(gem_path, 'lib/slide_hero/views/ordered_list.html.erb')).render(self) end end def point(text, animation: nil) points << ListPoint.new(text, { animation: animation }) end def points @points ||= [] end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
slide_hero-0.0.3 | lib/slide_hero/list.rb |
slide_hero-0.0.2 | lib/slide_hero/list.rb |