summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2024-09-04 10:56:16 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2024-09-04 10:56:16 +0200
commite502b49ac5c80c33878b9b030e3b9ec9b46bf173 (patch)
tree6883adac1c55553787140d26442056f9866f2d32
parent5c902a9544576b2e8893a2365283393b3d0baae7 (diff)
downloadzorglub-e502b49ac5c80c33878b9b030e3b9ec9b46bf173.zip
zorglub-e502b49ac5c80c33878b9b030e3b9ec9b46bf173.tar.gz
Node : use keyword arguments
-rw-r--r--lib/zorglub/node.rb8
1 files 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