We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab620d5 commit eefb03cCopy full SHA for eefb03c
lib/carrierwave/qiniu/configuration.rb
@@ -11,7 +11,7 @@ module Configuration
11
add_config :qiniu_secret_key
12
add_config :qiniu_block_size
13
add_config :qiniu_protocol
14
- add_config :qiniu_protocal
+ alias_config :qiniu_protocal, :qiniu_protocol
15
end
16
17
@@ -36,6 +36,22 @@ def #{name}
36
37
RUBY
38
39
+
40
+ def alias_config(new_name, old_name)
41
+ class_eval <<-RUBY, __FILE__, __LINE__ + 1
42
+ def self.#{new_name}(value=nil)
43
+ self.#{old_name}(value)
44
+ end
45
46
+ def self.#{new_name}=(value)
47
+ self.#{old_name}=(value)
48
49
50
+ def #{new_name}
51
+ #{old_name}
52
53
+ RUBY
54
55
56
57
0 commit comments