Sha256: 5a72fb02a8acb3d8f849e2186709fe18a0fa7fdd9e5b22d1cef712b26b01e13a
Contents?: true
Size: 659 Bytes
Versions: 1
Compression:
Stored size: 659 Bytes
Contents
class Object class_attribute :comma_formats def self.comma(style = :default, &block) (self.comma_formats ||= {})[style] = block end def to_comma(style = :default) 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, style, self.class.comma_formats).results end def to_comma_headers(style = :default) 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, style, self.class.comma_formats).results end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
comma-3.1.0 | lib/comma/object.rb |