lib/mtif.rb in mtif-0.0.1 vs lib/mtif.rb in mtif-0.0.2
- old
+ new
@@ -7,15 +7,15 @@
attr_accessor :posts
def initialize(content)
@posts = content.slice_after(/^--------$/).map {|raw_post| MTIF::Post.new(raw_post)}
end
-
+
def self.load_file(filename)
mtif_file = File.open(filename)
mtif = MTIF.new(mtif_file.readlines)
mtif_file.close
-
+
mtif
end
def to_mtif
posts.map(&:to_mtif).join