Initial commit
This commit is contained in:
9
config/initializers/presence.rb
Normal file
9
config/initializers/presence.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
# encoding: UTF-8
|
||||
# frozen_string_literal: true
|
||||
|
||||
class Hash
|
||||
def fetch!(key)
|
||||
raise RuntimeError, "Required key #{key.inspect} is missing or is blank!" unless self[key].present?
|
||||
self[key]
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user