Skip to content
Snippets Groups Projects
Verified Commit 41f0eb72 authored by Alexander Olofsson's avatar Alexander Olofsson
Browse files

Modify resource list creation to be more obvious

parent a3a9111c
No related branches found
No related tags found
No related merge requests found
......@@ -35,21 +35,25 @@ module Passwordstate
end
def folders
ResourceList.new self, Passwordstate::Resources::Folder,
ResourceList.new Passwordstate::Resources::Folder,
client: self,
only: %i[all search post]
end
def hosts
ResourceList.new self, Passwordstate::Resources::Host,
ResourceList.new Passwordstate::Resources::Host,
client: self,
except: %i[search put]
end
def passwords
ResourceList.new self, Passwordstate::Resources::Password
ResourceList.new Passwordstate::Resources::Password,
client: self
end
def password_lists
ResourceList.new self, Passwordstate::Resources::PasswordList,
ResourceList.new Passwordstate::Resources::PasswordList,
client: self,
except: %i[put delete]
end
......
......@@ -28,7 +28,7 @@ module Passwordstate
attr_reader :client, :resource, :options
def initialize(client, resource, options = {})
def initialize(resource, client:, **options)
@client = client
@resource = resource
@loaded = false
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment