Class: Shakapacker::Env

Inherits:
Object
  • Object
show all
Defined in:
lib/shakapacker/env.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(instance) ⇒ Env

Returns a new instance of Env.



8
9
10
# File 'lib/shakapacker/env.rb', line 8

def initialize(instance)
  @instance = instance
end

Class Method Details

.inquire(instance) ⇒ Object



4
5
6
# File 'lib/shakapacker/env.rb', line 4

def self.inquire(instance)
  new(instance).inquire
end

Instance Method Details

#inquireObject



12
13
14
15
# File 'lib/shakapacker/env.rb', line 12

def inquire
  fallback_env_warning if config_path.exist? && !current
  current || Shakapacker::DEFAULT_ENV.inquiry
end