PragTob / wingtips

A nice little presentation written in shoes
MIT License
12 stars 1 forks source link

DSL for simple slides #6

Closed PragTob closed 10 years ago

PragTob commented 10 years ago

Most of the slides I write are rather simple, i.e. just a simple image, a headline and a couple of bullet points, reference to one code sample... for this the whole class/ def content feels a bit like overkill.

I propose that we might add a DSL for these that can be used in these cases.

DSL proposal:

slide 'MySlide' do
  headline 'I love DSLs'
end

# equivalent to:

class MySlide < Wingtips::Slide
  def content
    headline 'I love DSLs'
  end
end

Of course the old style should still always work.

What do you think? :)

jasonrclark commented 10 years ago

Funny to find this, because I implemented pretty much exactly this just for kicks as I was writing out my slides :)

PragTob commented 10 years ago

Oh @jasonrclark fixed that a long time ago :clap: