lib/genit/extensions.rb in genit-0.5 vs lib/genit/extensions.rb in genit-0.9

- old
+ new

@@ -1,45 +1,3 @@ # -*- encoding: utf-8 -*- - -class String - - def force_html_extension - self.gsub /markdown$/, 'html' - end - - def force_html_extension! - self.gsub! /markdown$/, 'html' - end - - def markdown_ext? - self.end_with?('.markdown') - end - -end - -module Nokogiri - module XML - - # I think it's a bad idea to extend the Nokogiri library cause it makes a - # too big dependency on Genit. - # It will be much better to do a little wrapper over Nokogiri::XML::Node. - class Node - - def genit_class? - if self['class'] - true - else - false - end - end - - def genit_var? - if self['var'] - true - else - false - end - end - - end - end -end +require 'genit/extensions/string_extension' +require 'genit/extensions/nokogiri_extension'