lib/slide_hero/slide.rb in slide_hero-0.0.2 vs lib/slide_hero/slide.rb in slide_hero-0.0.3
- old
+ new
@@ -14,22 +14,34 @@
'lib/slide_hero/views/slide.html.erb')).
render(self)
end
def point(text, animation: nil)
- points << Point.new(text, animation: nil).compile
+ points << Point.new(text, animation: animation).compile
end
def list(style=:unordered, &block)
points << List.new(style, &block).compile
end
- def code(language, &code)
- points << Code.new(language, &code).compile
+ def code(*args, &code)
+ points << Code.new(*args, &code).compile
end
def points
@points ||= []
+ end
+
+ def note(text)
+ points << Note.new(text).compile
+ end
+
+ def image(*args, **kwargs)
+ points << Image.new(*args, **kwargs).compile
+ end
+
+ def media(*args, **kwargs)
+ points << Media.new(*args, **kwargs).compile
end
private
def size_to_markup
{