lib/osheet/template.rb in osheet-1.0.0 vs lib/osheet/template.rb in osheet-1.1.0

- old
+ new

@@ -7,9 +7,11 @@ # if an element is initialized from a template, the template # block will be instance_eval'd for the element being initialized ELEMENTS = ['worksheet', 'column', 'row', 'cell'] + attr_reader :element + def initialize(element, name) unless element.respond_to?(:to_s) && ELEMENTS.include?(element.to_s) raise ArgumentError, "you can only define a template for #{ELEMENTS.join(', ')} elements." end