about summary refs log tree commit diff
path: root/app/services/keys/query_service.rb
diff options
context:
space:
mode:
authorabcang <abcang1015@gmail.com>2021-01-07 17:40:55 +0900
committerGitHub <noreply@github.com>2021-01-07 09:40:55 +0100
commitefffdd3778fc960280c7677906ed43dae5a952b0 (patch)
treeafc88388bd8d25a9bc9ecab6fe15adb9394c6921 /app/services/keys/query_service.rb
parent066dbe1e699775f59f02298c369225277aac234b (diff)
Fix rubocop config and warnings (#15503)
* disable NewCops

* update TargetRubyVersion

* Fix Lint/MissingSuper for ActiveModelSerializers::Model

* Fix Lint/MissingSuper for feed

* Fix Lint/FloatComparison

* Do not use instance variables
Diffstat (limited to 'app/services/keys/query_service.rb')
-rw-r--r--app/services/keys/query_service.rb18
1 files changed, 11 insertions, 7 deletions
diff --git a/app/services/keys/query_service.rb b/app/services/keys/query_service.rb
index 286fbd834..ac3388bdc 100644
--- a/app/services/keys/query_service.rb
+++ b/app/services/keys/query_service.rb
@@ -7,8 +7,10 @@ class Keys::QueryService < BaseService
     attributes :account, :devices
 
     def initialize(account, devices)
-      @account = account
-      @devices = devices || []
+      super(
+        account: account,
+        devices: devices || [],
+      )
     end
 
     def find(device_id)
@@ -20,11 +22,13 @@ class Keys::QueryService < BaseService
     attributes :device_id, :name, :identity_key, :fingerprint_key
 
     def initialize(attributes = {})
-      @device_id       = attributes[:device_id]
-      @name            = attributes[:name]
-      @identity_key    = attributes[:identity_key]
-      @fingerprint_key = attributes[:fingerprint_key]
-      @claim_url       = attributes[:claim_url]
+      super(
+        device_id:       attributes[:device_id],
+        name:            attributes[:name],
+        identity_key:    attributes[:identity_key],
+        fingerprint_key: attributes[:fingerprint_key],
+      )
+      @claim_url = attributes[:claim_url]
     end
 
     def valid_claim_url?