Class: Duse::Client::CreateSecret

Inherits:
Object
  • Object
show all
Defined in:
lib/duse/client/secret.rb

Defined Under Namespace

Classes: CreatableSecret

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ CreateSecret

Returns a new instance of CreateSecret.



64
65
66
67
68
# File 'lib/duse/client/secret.rb', line 64

def initialize(options)
  @title = options.fetch(:title)
  @secret_text = options.fetch(:secret_text)
  @users = options.fetch(:users)
end

Class Method Details

.with(options) ⇒ Object



60
61
62
# File 'lib/duse/client/secret.rb', line 60

def self.with(options)
  new(options)
end

Instance Method Details

#sign_with(private_key) ⇒ Object



70
71
72
73
74
75
76
77
# File 'lib/duse/client/secret.rb', line 70

def sign_with(private_key)
  CreatableSecret.new(
    title: @title,
    secret_text: @secret_text,
    users: @users,
    private_key: private_key
  )
end