Sha256: 6e9f85fa243bcf0032c044e407c040fcb20aa149a4c9152155c186b4ab47a4ee
Contents?: true
Size: 554 Bytes
Versions: 1
Compression:
Stored size: 554 Bytes
Contents
module SlideHero class GroupedSlides def initialize(slide_defaults={}, &block) @slide_defaults = slide_defaults instance_eval(&block) end def compile Tilt::ERBTemplate. new(File.join(Gem.loaded_specs['slide_hero'].full_gem_path, 'lib/slide_hero/views/grouped_slides.html.erb')).render(self) end def slide(headline, **kwargs, &block) slides << Slide.new(headline, @slide_defaults.merge(**kwargs), &block).compile end def slides @slides ||= [] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
slide_hero-0.0.3 | lib/slide_hero/grouped_slides.rb |