Sha256: f9d451c828feb4c387052a81bc40637104dc927cae123a8113ae9585f5f9abaf

Contents?: true

Size: 374 Bytes

Versions: 2

Compression:

Stored size: 374 Bytes

Contents

module SlideHero
  class GroupedSlides
    include Compilable
    def initialize(slide_defaults={}, &block)
      @slide_defaults = slide_defaults
      instance_eval(&block)
    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

2 entries across 2 versions & 1 rubygems

Version Path
slide_hero-0.0.11 lib/slide_hero/grouped_slides.rb
slide_hero-0.0.10 lib/slide_hero/grouped_slides.rb