csv_attr_reader(*attrs)
private
Hide source
# File lib/rss/rss.rb, line 399 def csv_attr_reader(*attrs) separator = nil if attrs.last.is_a?(Hash) options = attrs.pop separator = options[:separator] end separator ||= ", " attrs.each do |attr| module_eval( attr_reader(:#{attr}) def #{attr}_content if @#{attr}.nil? @#{attr} else @#{attr}.join(#{separator.dump}) end end, __FILE__, __LINE__ + 1) end end