lib/bmg/writer.rb in bmg-0.18.2 vs lib/bmg/writer.rb in bmg-0.18.3
- old
+ new
@@ -1,15 +1,31 @@
+module Bmg
+ module Writer
+
+ protected
+
+ def infer_headers(from)
+ attrlist = if from.is_a?(Type) && from.knows_attrlist?
+ from.to_attrlist
+ elsif from.is_a?(Hash)
+ from.keys
+ end
+ attrlist ? output_preferences.order_attrlist(attrlist) : nil
+ end
+
+ end # module Writer
+end # module Bmg
require_relative 'writer/csv'