Class: Dotenv::Environment
- Inherits:
-
Hash
- Object
- Hash
- Dotenv::Environment
- Defined in:
- lib/dotenv/environment.rb
Overview
A ‘.env` file that will be read and parsed into a Hash
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#overwrite ⇒ Object
readonly
Returns the value of attribute overwrite.
Instance Method Summary collapse
-
#initialize(filename, overwrite: false) ⇒ Environment
constructor
Create a new Environment.
- #load ⇒ Object
- #read ⇒ Object
Constructor Details
#initialize(filename, overwrite: false) ⇒ Environment
Create a new Environment
10 11 12 13 14 15 |
# File 'lib/dotenv/environment.rb', line 10 def initialize(filename, overwrite: false) super() @filename = filename @overwrite = overwrite load end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
4 5 6 |
# File 'lib/dotenv/environment.rb', line 4 def filename @filename end |
#overwrite ⇒ Object (readonly)
Returns the value of attribute overwrite.
4 5 6 |
# File 'lib/dotenv/environment.rb', line 4 def overwrite @overwrite end |