Class: Duse::Client::CreateSecret
- Inherits:
-
Object
- Object
- Duse::Client::CreateSecret
- Defined in:
- lib/duse/client/secret.rb
Defined Under Namespace
Classes: CreatableSecret
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options) ⇒ CreateSecret
constructor
A new instance of CreateSecret.
- #sign_with(private_key) ⇒ Object
Constructor Details
#initialize(options) ⇒ CreateSecret
Returns a new instance of CreateSecret.
69 70 71 72 73 74 75 |
# File 'lib/duse/client/secret.rb', line 69 def initialize() @title = .fetch(:title) @secret_text = .fetch(:secret_text) @users = .fetch(:users) @folder_id = .fetch(:folder_id, nil) @folder_id = @folder_id.to_i if !@folder_id.nil? end |
Class Method Details
.with(options) ⇒ Object
65 66 67 |
# File 'lib/duse/client/secret.rb', line 65 def self.with() new() end |
Instance Method Details
#sign_with(private_key) ⇒ Object
77 78 79 80 81 82 83 84 85 |
# File 'lib/duse/client/secret.rb', line 77 def sign_with(private_key) CreatableSecret.new( title: @title, secret_text: @secret_text, users: @users, private_key: private_key, folder_id: @folder_id ) end |