Class: Qravan::Credentials::System

Inherits:
Object
  • Object
show all
Defined in:
lib/qravan/credentials/system.rb

Overview

System credentials

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(credentials) ⇒ System

Returns a new instance of System.



8
9
10
# File 'lib/qravan/credentials/system.rb', line 8

def initialize(credentials)
  @credentials = credentials["system"]
end

Instance Attribute Details

#credentialsObject

Returns the value of attribute credentials.



6
7
8
# File 'lib/qravan/credentials/system.rb', line 6

def credentials
  @credentials
end

Instance Method Details

#instanceObject



24
25
26
# File 'lib/qravan/credentials/system.rb', line 24

def instance
  @credentials["instance_id"]
end

#mnemonicObject



20
21
22
# File 'lib/qravan/credentials/system.rb', line 20

def mnemonic
  @credentials["mnemonic"]
end

#prepareObject



12
13
14
15
16
17
18
# File 'lib/qravan/credentials/system.rb', line 12

def prepare
  {
    mnemonic: mnemonic,
    instance_id: instance,
    user_id: user
  }
end

#userObject



28
29
30
# File 'lib/qravan/credentials/system.rb', line 28

def user
  @credentials["user_id"]
end