lib/io_streams/tabular.rb in iostreams-1.2.1 vs lib/io_streams/tabular.rb in iostreams-1.3.0

- old
+ new

@@ -87,11 +87,11 @@ if file_name && format.nil? self.class.parser_class_for_file_name(file_name) else self.class.parser_class(format) end - @parser = format_options ? klass.new(format_options) : klass.new + @parser = format_options ? klass.new(**format_options) : klass.new end # Returns [true|false] whether a header is still required in order to parse or render the current format. def header? parser.requires_header? && IOStreams::Utils.blank?(header.columns) @@ -140,10 +140,13 @@ # Return nil if no header is required. def render_header return unless requires_header? if IOStreams::Utils.blank?(header.columns) - raise(Errors::MissingHeader, "Header columns must be set before attempting to render a header for format: #{format.inspect}") + raise( + Errors::MissingHeader, + "Header columns must be set before attempting to render a header for format: #{format.inspect}" + ) end parser.render(header.columns, header) end