lib/ginny/models/class.rb in ginny-0.5.3 vs lib/ginny/models/class.rb in ginny-0.5.4

- old
+ new

@@ -68,13 +68,13 @@ parts << (self.parent.nil? ? "class #{self.class_name()}" : "class #{self.class_name()} < #{self.parent}") parts << self.render_attributes() parts << (self.body&.length&.positive? ? self.body.indent(2) : nil) parts << "end" if self.modules.length > 0 - body = parts.compact.join("\n").gsub(/(\s+)$/, "") + body = parts.compact.join("\n").gsub(/([[:blank:]]+)$/, "") return Ginny.mod(body, self.modules) end - return parts.compact.join("\n").gsub(/(\s+)$/, "") + return parts.compact.join("\n").gsub(/([[:blank:]]+)$/, "") end # @return [String] def render_attributes() return nil unless self.attrs.length > 0