Class: Greenpeace::Configuration::Key

Inherits:
Object
  • Object
show all
Defined in:
lib/greenpeace/configuration/key.rb

Overview

Represents an environment key in a configuration entry

Instance Method Summary collapse

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_identifierObject



21
22
23
# File 'lib/greenpeace/configuration/key.rb', line 21

def env_identifier
  @key.to_s.upcase
end

#identifierObject



17
18
19
# File 'lib/greenpeace/configuration/key.rb', line 17

def identifier
  @key.to_s
end

#to_sObject



13
14
15
# File 'lib/greenpeace/configuration/key.rb', line 13

def to_s
  @key.to_s
end