Class: NimbusSecure::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/nimbussecure/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



5
6
7
8
# File 'lib/nimbussecure/config.rb', line 5

def initialize
  @crypt_keys={}
  @endpoint="https://www.nimbussecure.com"
end

Instance Attribute Details

#accountObject

Returns the value of attribute account.



4
5
6
# File 'lib/nimbussecure/config.rb', line 4

def 
  @account
end

#apikeyObject

Returns the value of attribute apikey.



4
5
6
# File 'lib/nimbussecure/config.rb', line 4

def apikey
  @apikey
end

#crypt_keysObject

Returns the value of attribute crypt_keys.



4
5
6
# File 'lib/nimbussecure/config.rb', line 4

def crypt_keys
  @crypt_keys
end

#endpointObject

Returns the value of attribute endpoint.



4
5
6
# File 'lib/nimbussecure/config.rb', line 4

def endpoint
  @endpoint
end

Instance Method Details

#invalid?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/nimbussecure/config.rb', line 9

def invalid?
  endpoint.nil? || .nil? || apikey.nil? || crypt_keys.size==0
end

#valid?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/nimbussecure/config.rb', line 12

def valid?
  !invalid?
end