Class: BitwardenSDKSecrets::BitwardenClient
- Inherits:
-
Object
- Object
- BitwardenSDKSecrets::BitwardenClient
- Defined in:
- lib/bitwarden-sdk-secrets.rb
Instance Attribute Summary collapse
-
#auth ⇒ Object
readonly
Returns the value of attribute auth.
-
#bitwarden ⇒ Object
readonly
Returns the value of attribute bitwarden.
-
#projects ⇒ Object
readonly
Returns the value of attribute projects.
-
#secrets ⇒ Object
readonly
Returns the value of attribute secrets.
Instance Method Summary collapse
- #free_mem ⇒ Object
-
#initialize(bitwarden_settings) ⇒ BitwardenClient
constructor
A new instance of BitwardenClient.
Constructor Details
#initialize(bitwarden_settings) ⇒ BitwardenClient
Returns a new instance of BitwardenClient.
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/bitwarden-sdk-secrets.rb', line 32 def initialize(bitwarden_settings) client_settings = ClientSettings.new( api_url: bitwarden_settings.api_url, identity_url: bitwarden_settings.identity_url, user_agent: 'Bitwarden RUBY-SDK', device_type: nil ) @bitwarden = BitwardenLib @handle = @bitwarden.init(client_settings.to_dynamic.compact.to_json) @command_runner = CommandRunner.new(@bitwarden, @handle) @projects = ProjectsClient.new(@command_runner) @secrets = SecretsClient.new(@command_runner) @auth = AuthClient.new(@command_runner) end |
Instance Attribute Details
#auth ⇒ Object (readonly)
Returns the value of attribute auth.
30 31 32 |
# File 'lib/bitwarden-sdk-secrets.rb', line 30 def auth @auth end |
#bitwarden ⇒ Object (readonly)
Returns the value of attribute bitwarden.
30 31 32 |
# File 'lib/bitwarden-sdk-secrets.rb', line 30 def bitwarden @bitwarden end |
#projects ⇒ Object (readonly)
Returns the value of attribute projects.
30 31 32 |
# File 'lib/bitwarden-sdk-secrets.rb', line 30 def projects @projects end |
#secrets ⇒ Object (readonly)
Returns the value of attribute secrets.
30 31 32 |
# File 'lib/bitwarden-sdk-secrets.rb', line 30 def secrets @secrets end |
Instance Method Details
#free_mem ⇒ Object
48 49 50 |
# File 'lib/bitwarden-sdk-secrets.rb', line 48 def free_mem @bitwarden.free_mem(@handle) end |