lib/deck/slide.rb in deckrb-0.2.1 vs lib/deck/slide.rb in deckrb-0.2.2
- old
+ new
@@ -5,11 +5,12 @@
module Deck
class Slide < Erector::Widget
include Deck::Noko
- # todo: test this method
+ # todo: test this method on its own
def self.from_file markdown_file
+ markdown_file = markdown_file.path if markdown_file.is_a? File # fix for Ruby 1.8.7
split File.read(markdown_file)
end
# given a chunk of Markdown text, splits it into an array of Slide objects
# todo: move into SlideDeck?