Class: DaggerRuby::Secret

Inherits:
DaggerObject show all
Defined in:
lib/dagger_ruby/secret.rb

Instance Attribute Summary

Attributes inherited from DaggerObject

#client, #query_builder

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DaggerObject

#chain_operation, #id, #initialize

Constructor Details

This class inherits a constructor from DaggerRuby::DaggerObject

Class Method Details

.from_id(id, client) ⇒ Object



7
8
9
10
11
# File 'lib/dagger_ruby/secret.rb', line 7

def self.from_id(id, client)
  query = QueryBuilder.new("secret")
  query.load_from_id(id)
  new(query, client)
end

.root_field_nameObject



13
14
15
# File 'lib/dagger_ruby/secret.rb', line 13

def self.root_field_name
  "secret"
end

Instance Method Details

#nameObject



25
26
27
# File 'lib/dagger_ruby/secret.rb', line 25

def name
  get_scalar("name")
end

#plaintextObject



29
30
31
# File 'lib/dagger_ruby/secret.rb', line 29

def plaintext
  get_scalar("plaintext")
end

#syncObject



33
34
35
36
# File 'lib/dagger_ruby/secret.rb', line 33

def sync
  get_scalar("id")
  self
end

#with_name(name) ⇒ Object



17
18
19
# File 'lib/dagger_ruby/secret.rb', line 17

def with_name(name)
  chain_operation("withName", { "name" => name })
end

#with_plaintext(plaintext) ⇒ Object



21
22
23
# File 'lib/dagger_ruby/secret.rb', line 21

def with_plaintext(plaintext)
  chain_operation("withPlaintext", { "plaintext" => plaintext })
end