Class: Benry::Config::AbstractValue

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

Direct Known Subclasses

SecretValue

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(envvar = nil) ⇒ AbstractValue

Returns a new instance of AbstractValue.



21
22
23
24
# File 'lib/benry/config.rb', line 21

def initialize(envvar=nil)
  #; [!6hcf9] accepts environment variable name.
  @envvar = envvar
end

Instance Attribute Details

#envvarObject (readonly)

Returns the value of attribute envvar.



26
27
28
# File 'lib/benry/config.rb', line 26

def envvar
  @envvar
end

Instance Method Details

#[](envvar) ⇒ Object



28
29
30
31
# File 'lib/benry/config.rb', line 28

def [](envvar)
  #; [!p0acp] returns new object with environment variable name.
  return self.class.new(envvar)
end