lib/comma.rb in crafterm-comma-0.1.4 vs lib/comma.rb in crafterm-comma-0.1.5
- old
+ new
@@ -19,15 +19,15 @@
def self.comma(style = :default, &block)
(self.comma_formats ||= {})[style] = block
end
def to_comma(style = :default)
- raise "No comma format defined for style #{style}" unless self.comma_formats[style]
+ raise "No comma format for class #{self.class} defined for style #{style}" unless self.comma_formats and self.comma_formats[style]
Comma::DataExtractor.new(self, &self.comma_formats[style]).results
end
def to_comma_headers(style = :default)
- raise "No comma format defined for style #{style}" unless self.comma_formats[style]
+ raise "No comma format for class #{self.class} defined for style #{style}" unless self.comma_formats and self.comma_formats[style]
Comma::HeaderExtractor.new(self, &self.comma_formats[style]).results
end
end
if defined?(ActionController)
\ No newline at end of file