lib/defmastership/csv_formatter_body.rb in defmastership-1.0.5 vs lib/defmastership/csv_formatter_body.rb in defmastership-1.0.6
- old
+ new
@@ -8,26 +8,31 @@
class CSVFormatterBody
def initialize(doc)
@doc = doc
end
- def fixed_body(definition)
- [definition.type, definition.reference, definition.value]
+ def fixed(definition)
+ [definition.type, definition.reference, definition.value, definition.sha256]
end
- def labels_body(definition)
+ def wrong_explicit_checksum(definition)
+ wrong_explicit_checksum = definition.wrong_explicit_checksum
+ wrong_explicit_checksum ? [wrong_explicit_checksum] : ['']
+ end
+
+ def labels(definition)
@doc.labels.empty? ? [] : [definition.labels.to_a.join("\n")]
end
- def eref_body(definition)
+ def eref(definition)
@doc.eref.map { |key, _| definition.eref[key].join("\n") }
end
- def iref_body(definition)
+ def iref(definition)
@doc.iref ? [definition.iref.join("\n")] : []
end
- def attributes_body(definition)
+ def attributes(definition)
@doc.attributes.map do |key, _|
definition.attributes[key]
end
end
end