Class: Lastpass::Collection Private
- Inherits:
-
Object
- Object
- Lastpass::Collection
- Defined in:
- lib/lastpass-api/collection.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Represents a collection of Lastpass objects (whether that be accounts or groups)
Instance Method Summary collapse
-
#find(search_text, with_password: false) ⇒ Hash, NilClass
private
Find a specific object by name or by ID.
-
#find_all(search_text = '.*', with_passwords: false) ⇒ Array<Hash>
private
Find all objects by name or by ID.
Instance Method Details
#find(search_text, with_password: false) ⇒ Hash, NilClass
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Find a specific object by name or by ID
13 14 15 |
# File 'lib/lastpass-api/collection.rb', line 13 def find( search_text, with_password: false ) show( search_text, with_passwords: with_password )&.first end |
#find_all(search_text = '.*', with_passwords: false) ⇒ Array<Hash>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Note:
By default, with no params specified, all objects will be returned.
Find all objects by name or by ID
23 24 25 |
# File 'lib/lastpass-api/collection.rb', line 23 def find_all( search_text = '.*', with_passwords: false ) show( search_text, with_passwords: with_passwords, regex: true ) || [] end |