Skip to content

Commit

Permalink
Call super() in subclasses
Browse files Browse the repository at this point in the history
  • Loading branch information
bkeepers committed Jan 21, 2024
1 parent 12a4b50 commit f47d226
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/dotenv/environment.rb
Expand Up @@ -2,9 +2,10 @@ module Dotenv
# This class inherits from Hash and represents the environment into which
# Dotenv will load key value pairs from a file.
class Environment < Hash
attr_reader :filename
attr_reader :filename, :overwrite

def initialize(filename, overwrite: false)
super()
@filename = filename
@overwrite = overwrite
load
Expand Down
1 change: 1 addition & 0 deletions lib/dotenv/rails.rb
Expand Up @@ -19,6 +19,7 @@ class Rails < ::Rails::Railtie
attr_accessor :overwrite, :files

def initialize
super()
@overwrite = false
@files = [
root.join(".env.#{env}.local"),
Expand Down

0 comments on commit f47d226

Please sign in to comment.