Class: AppEnv::Environment

Inherits:
ActiveSupport::OrderedOptions
  • Object
show all
Defined in:
lib/appenv/environment.rb

Instance Method Summary collapse

Constructor Details

#initialize(file = '.env', &blk) ⇒ Environment

Returns a new instance of Environment.



3
4
5
6
7
8
# File 'lib/appenv/environment.rb', line 3

def initialize(file = '.env', &blk)
  super(&nil)
  @file = file
  source = _compile_source_env
  blk.call(self, source)
end

Instance Method Details

#set(property, &blk) ⇒ Object



11
12
13
# File 'lib/appenv/environment.rb', line 11

def set(property, &blk)
  self.send("#{property}=", blk.call)
end