Skip to content

Commit ba37008

Browse files
committed
style edits
1 parent 0dec44c commit ba37008

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

lib/mailtrap/client.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ def initialize( # rubocop:disable Metrics/ParameterLists
4040
validate_args!(api_key, api_port, bulk, sandbox, inbox_id)
4141

4242
api_host ||= select_api_host(bulk:, sandbox:)
43-
4443
@api_key = api_key
4544
@api_host = api_host
4645
@general_api_host = general_api_host

lib/mailtrap/project.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ module Mailtrap
1616
:permissions,
1717
keyword_init: true
1818
) do
19-
2019
# @return [Hash] The project attributes as a hash
2120
def to_h
2221
super.compact

spec/spec_helper.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,17 @@
2828

2929
case body
3030
when Hash
31-
body["share_links"].transform_values! { |e| e.gsub(/\/share\/.+/, '/share/REDACTED') } if body.key?("share_links")
31+
body['share_links'].transform_values! { |e| e.gsub(%r{/share/.+}, '/share/REDACTED') } if body.key?('share_links')
3232
when Array
3333
body.map do |item|
34-
item["share_links"].transform_values! { |e| e.gsub(/\/share\/.+/, '/share/REDACTED') } if item.key?("share_links")
34+
if item.key?('share_links')
35+
item['share_links'].transform_values! do |e|
36+
e.gsub(%r{/share/.+}, '/share/REDACTED')
37+
end
38+
end
3539
item
3640
end
37-
else
41+
else # rubocop:disable Style/EmptyElse
3842
# noop
3943
end
4044

0 commit comments

Comments
 (0)