Class: Benry::Config::AbstractValue
- Inherits:
-
Object
- Object
- Benry::Config::AbstractValue
- Defined in:
- lib/benry/config.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#envvar ⇒ Object
readonly
Returns the value of attribute envvar.
Instance Method Summary collapse
- #[](envvar) ⇒ Object
-
#initialize(envvar = nil) ⇒ AbstractValue
constructor
A new instance of AbstractValue.
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
#envvar ⇒ Object (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 |