lib/hanami/router/formatter/csv.rb in hanami-router-2.2.0.rc1 vs lib/hanami/router/formatter/csv.rb in hanami-router-2.2.0
- old
+ new
@@ -35,10 +35,10 @@
HEADERS = %w[METHOD PATH TO AS CONSTRAINTS].freeze
# @api private
# @since 2.0.0
def call(routes, **csv_opts)
- ::CSV.generate(**DEFAULT_OPTIONS.merge(csv_opts)) do |csv|
+ ::CSV.generate(**DEFAULT_OPTIONS, **csv_opts) do |csv|
csv << HEADERS if csv.write_headers?
routes.reduce(csv) do |acc, route|
route.head? ? acc : acc << row(route)
end
end