Class: NimbusSecure::Config
- Inherits:
-
Object
- Object
- NimbusSecure::Config
- Defined in:
- lib/nimbussecure/config.rb
Instance Attribute Summary collapse
-
#account ⇒ Object
Returns the value of attribute account.
-
#apikey ⇒ Object
Returns the value of attribute apikey.
-
#crypt_keys ⇒ Object
Returns the value of attribute crypt_keys.
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #invalid? ⇒ Boolean
- #valid? ⇒ Boolean
Constructor Details
#initialize ⇒ Config
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
#account ⇒ Object
Returns the value of attribute account.
4 5 6 |
# File 'lib/nimbussecure/config.rb', line 4 def account @account end |
#apikey ⇒ Object
Returns the value of attribute apikey.
4 5 6 |
# File 'lib/nimbussecure/config.rb', line 4 def apikey @apikey end |
#crypt_keys ⇒ Object
Returns the value of attribute crypt_keys.
4 5 6 |
# File 'lib/nimbussecure/config.rb', line 4 def crypt_keys @crypt_keys end |
#endpoint ⇒ Object
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
9 10 11 |
# File 'lib/nimbussecure/config.rb', line 9 def invalid? endpoint.nil? || account.nil? || apikey.nil? || crypt_keys.size==0 end |
#valid? ⇒ Boolean
12 13 14 |
# File 'lib/nimbussecure/config.rb', line 12 def valid? !invalid? end |