lib/io_streams/tabular/parser/array.rb in iostreams-1.1.0 vs lib/io_streams/tabular/parser/array.rb in iostreams-1.1.1
- old
+ new
@@ -1,6 +1,6 @@
-require 'json'
+require "json"
module IOStreams
class Tabular
module Parser
class Array < Base
# Returns [Array<String>] the header row.
@@ -13,12 +13,10 @@
row
end
# Returns Array
def parse(row)
- unless row.is_a?(::Array)
- raise(IOStreams::Errors::TypeMismatch, "Format is :array. Invalid input: #{row.class.name}")
- end
+ raise(IOStreams::Errors::TypeMismatch, "Format is :array. Invalid input: #{row.class.name}") unless row.is_a?(::Array)
row
end
def render(row, header)