From e502b49ac5c80c33878b9b030e3b9ec9b46bf173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 4 Sep 2024 10:56:16 +0200 Subject: Node : use keyword arguments --- lib/zorglub/node.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/zorglub/node.rb b/lib/zorglub/node.rb index 69ecc20..4be8a1d 100644 --- a/lib/zorglub/node.rb +++ b/lib/zorglub/node.rb @@ -237,10 +237,10 @@ module Zorglub end def partial(env, meth, *args) - node = new env, meth.to_s, args, true + node = new(env, meth.to_s, args, partial: true) return error404 node, meth unless node.respond_to? meth - node.feed! env[:no_hooks] + node.feed!(no_hooks: env[:no_hooks]) node.content end @@ -256,7 +256,7 @@ module Zorglub attr_reader :request, :response, :content, :mime, :state, :engine, :meth, :args - def initialize(env, meth, args, partial = false) + def initialize(env, meth, args, partial: false) @meth = meth @args = args @partial = partial @@ -281,7 +281,7 @@ module Zorglub end.finish end - def feed!(no_hooks = false) + def feed!(no_hooks: false) @state = :pre_cb self.class.call_before_hooks self unless no_hooks @state = :meth -- cgit v1.1-2-g2b99