rbind 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/rbind/generator_ruby.rb +5 -3
- data/rbind.gemspec +1 -1
- metadata +1 -1
data/lib/rbind/generator_ruby.rb
CHANGED
@@ -85,11 +85,13 @@ module Rbind
|
|
85
85
|
end
|
86
86
|
|
87
87
|
def self.normalize_method_name(name)
|
88
|
-
|
88
|
+
#replaced _X with _x
|
89
|
+
name = name.to_s.gsub(/\A#{RBase.cprefix}/, "").gsub(/_(?<!\A)\p{Lu}/u, '\0')
|
90
|
+
#replaced X with _x
|
91
|
+
name = name.gsub(/(?<!\A)\p{Lu}/u, '_\0').downcase
|
89
92
|
str = ""
|
90
93
|
name.split("_").each_with_index do |n,i|
|
91
|
-
|
92
|
-
if n.size == 1 && i > 1
|
94
|
+
if n.size == 1 && i > 0
|
93
95
|
str += n
|
94
96
|
else
|
95
97
|
str += "_#{n}"
|
data/rbind.gemspec
CHANGED