lib/mumuki/laboratory/mumukit/directives.rb in mumuki-laboratory-5.7.0 vs lib/mumuki/laboratory/mumukit/directives.rb in mumuki-laboratory-5.8.0
- old
+ new
@@ -1,16 +1,17 @@
require 'mumukit/directives'
class Mumukit::Directives::Sections < Mumukit::Directives::Directive
- def build(section, content)
- "#{comment_type.comment "<#{section}#"}#{content}#{comment_type.comment "##{section}>"}"
- end
-
def join(sections)
file_declarations, file_references = sections.map do |section, content|
[build(section, content), interpolate(section)]
end.transpose
- "#{file_declarations.join "\n"}\n#{build 'content', file_references.join("\n")}"
+
+ file_declarations.join "\n"
+ end
+
+ def build(section, content)
+ "#{comment_type.comment "<#{section}#"}#{content}#{comment_type.comment "##{section}>"}"
end
def interpolate(section)
comment_type.comment("...#{section}...")
end