Skip to content

Commit 92d8400

Browse files
committed
fix: linter
1 parent adfb216 commit 92d8400

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

lib/ferrum/browser/options/base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def to_h
2626
end
2727

2828
def except(*keys)
29-
to_h.reject { |n, _| keys.include?(n) }
29+
to_h.except(*keys)
3030
end
3131

3232
def detect_path

lib/ferrum/client.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ def command(method, async: false, **params)
2424
@client.send_message(message, async: async)
2525
end
2626

27-
def on(event, &block)
28-
@client.on(event_name(event), &block)
27+
def on(event, &)
28+
@client.on(event_name(event), &)
2929
end
3030

3131
def off(event, id)
@@ -40,8 +40,8 @@ def respond_to_missing?(name, include_private)
4040
@client.respond_to?(name, include_private)
4141
end
4242

43-
def method_missing(name, *args, **opts, &block)
44-
@client.send(name, *args, **opts, &block)
43+
def method_missing(name, ...)
44+
@client.send(name, ...)
4545
end
4646

4747
def close
@@ -102,8 +102,8 @@ def send_message(message, async:)
102102
end
103103
end
104104

105-
def on(event, &block)
106-
@subscriber.on(event, &block)
105+
def on(event, &)
106+
@subscriber.on(event, &)
107107
end
108108

109109
def off(event, id)

lib/ferrum/contexts.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ def default_context
2222
@default_context ||= create
2323
end
2424

25-
def each(&block)
25+
def each(&)
2626
return enum_for(__method__) unless block_given?
2727

28-
@contexts.each(&block)
28+
@contexts.each(&)
2929
end
3030

3131
def [](id)

lib/ferrum/network.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Network
1717
SignedExchange Ping CSPViolationReport Preflight Other].freeze
1818
AUTHORIZE_BLOCK_MISSING = "Block is missing, call `authorize(...) { |r| r.continue } " \
1919
"or subscribe to `on(:request)` events before calling it"
20-
AUTHORIZE_TYPE_WRONG = ":type should be in #{AUTHORIZE_TYPE}"
20+
AUTHORIZE_TYPE_WRONG = ":type should be in #{AUTHORIZE_TYPE}".freeze
2121
ALLOWED_CONNECTION_TYPE = %w[none cellular2g cellular3g cellular4g bluetooth ethernet wifi wimax other].freeze
2222

2323
# Network traffic.

spec/support/application.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
module Ferrum
66
class Application < Sinatra::Base
77
configure { set :protection, except: :frame_options }
8-
FERRUM_VIEWS = "#{File.dirname(__FILE__)}/views"
9-
FERRUM_PUBLIC = "#{File.dirname(__FILE__)}/public"
8+
FERRUM_VIEWS = "#{File.dirname(__FILE__)}/views".freeze
9+
FERRUM_PUBLIC = "#{File.dirname(__FILE__)}/public".freeze
1010

1111
set :root, File.dirname(__FILE__)
1212
set :static, true

0 commit comments

Comments
 (0)