Class: Greenpeace::Configuration::Key
- Inherits:
-
Object
- Object
- Greenpeace::Configuration::Key
- Defined in:
- lib/greenpeace/configuration/key.rb
Overview
Represents an environment key in a configuration entry
Instance Method Summary collapse
- #==(other) ⇒ Object
- #env_identifier ⇒ Object
- #identifier ⇒ Object
-
#initialize(key) ⇒ Key
constructor
A new instance of Key.
- #to_s ⇒ Object
Constructor Details
#initialize(key) ⇒ Key
Returns a new instance of Key.
5 6 7 |
# File 'lib/greenpeace/configuration/key.rb', line 5 def initialize(key) @key = validate_key(key) end |
Instance Method Details
#==(other) ⇒ Object
9 10 11 |
# File 'lib/greenpeace/configuration/key.rb', line 9 def ==(other) other.key == @key end |
#env_identifier ⇒ Object
21 22 23 |
# File 'lib/greenpeace/configuration/key.rb', line 21 def env_identifier @key.to_s.upcase end |
#identifier ⇒ Object
17 18 19 |
# File 'lib/greenpeace/configuration/key.rb', line 17 def identifier @key.to_s end |
#to_s ⇒ Object
13 14 15 |
# File 'lib/greenpeace/configuration/key.rb', line 13 def to_s @key.to_s end |