Method: Dotenv::Diff#initialize
- Defined in:
- lib/dotenv/diff.rb
#initialize(a: snapshot, b: ENV) {|diff| ... } ⇒ Diff
Create a new diff. If given a block, the state of ENV after the block will be preserved as the final state for comparison. Otherwise, the current ENV will be the final state.
16 17 18 19 20 21 |
# File 'lib/dotenv/diff.rb', line 16 def initialize(a: snapshot, b: ENV, &block) @a, @b = a, b block&.call self ensure @b = snapshot if block end |