We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d2fb5fc commit ce216a8Copy full SHA for ce216a8
1 file changed
lib/messagebird/base.rb
@@ -7,6 +7,8 @@ module MessageBird
7
class Base
8
# takes each element from the given hash and apply it to ourselves through an assignment method
9
def map_hash_elements_to_self(hash)
10
+ return if hash.nil?
11
+
12
hash.each do |key, value|
13
method_name = key.gsub(/([a-z\d])([A-Z])/, '\1_\2').downcase # convert came case to snake case
14
method_name += '='
0 commit comments