Class: Base
- Inherits:
-
Object
show all
- Defined in:
- lib/pry-byetypo/base.rb,
lib/pry-byetypo/setup/checks/base.rb
Class Method Summary
collapse
Class Method Details
.call ⇒ Object
5
6
7
|
# File 'lib/pry-byetypo/base.rb', line 5
def call(...)
new(...).call
end
|
.check(database_config, logger) ⇒ Object
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/pry-byetypo/setup/checks/base.rb', line 7
def check(database_config, logger)
URI.parse(database_config[name])
rescue URI::InvalidURIError
if ENV[variable]
database_config[name] = ENV[variable]
else
logger.warn(missing_variable_msg)
end
end
|