def serialize
contents = ""
(required_libraries || []).each do |lib|
contents << %Q{require '#{lib}'\n}
end
(loaded_frameworks || []).each do |lib|
contents << %Q{load '#{lib}'\n}
end
(framework_path || []).each do |lib|
contents << %Q{discover '#{lib}'\n}
end
contents << "# Require any additional compass plugins here.\n"
contents << "\n" if (required_libraries || []).any?
(ATTRIBUTES + ARRAY_ATTRIBUTES).each do |prop|
value = send("#{prop}_without_default")
if value.is_a?(Proc)
$stderr.puts "WARNING: #{prop} is code and cannot be written to a file. You'll need to copy it yourself."
end
if respond_to?("comment_for_#{prop}")
contents << "\n"
contents << send("comment_for_#{prop}")
end
if block_given? && (to_emit = yield(prop, value))
contents << to_emit
else
contents << serialize_property(prop, value) unless value.nil?
end
end
contents
end