ruby_words 0.2.0 → 0.3.0
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.
- checksums.yaml +4 -4
- data/lib/ruby_words/version.rb +1 -1
- data/lib/ruby_words.rb +2 -11
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 86dd15dc099779e07c4affe49696e9cd7faaf49258c1c8264252e0b36f8f3c19
|
|
4
|
+
data.tar.gz: '0233975a5e670ce70bf1bf1ef2b8ff41b21e1c817f8fec67cb4fb2a80203c6c5'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3f51f23623a0890d764e11d4023c5702b6d0586b0d6f61353b6eea0852ac944ffcbf8006e1a0521672dc9db5e996def42754297e67b1583330666be13e8ca5b2
|
|
7
|
+
data.tar.gz: 98e16ba8f4af597aa7cc6b2895b74e59188cd7b998316887ca788cd7313122f580e3335f03375ccc630ef613618875c55d4fce189acf17312622a8e8fc1d9c05
|
data/lib/ruby_words/version.rb
CHANGED
data/lib/ruby_words.rb
CHANGED
|
@@ -45,9 +45,9 @@ module RubyWords
|
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
def handle_class_or_module_declaration(declaration, pathname)
|
|
48
|
-
# Add the class/module name itself, split by ::
|
|
48
|
+
# Add the class/module name itself, split by ::
|
|
49
49
|
declaration.name.to_s.split("::").each do |part|
|
|
50
|
-
@method_names.append(
|
|
50
|
+
@method_names.append(part)
|
|
51
51
|
end
|
|
52
52
|
|
|
53
53
|
declaration.members.each do |member|
|
|
@@ -62,14 +62,5 @@ module RubyWords
|
|
|
62
62
|
name = member.name.name
|
|
63
63
|
@method_names.append(*name.split("_"))
|
|
64
64
|
end
|
|
65
|
-
|
|
66
|
-
def split_camel_case(word)
|
|
67
|
-
# Split CamelCase, handling acronyms like EOF in EOFError
|
|
68
|
-
# Since Ruby class names always start uppercase, we can use a simpler pattern
|
|
69
|
-
# EOFError -> EOF, Error
|
|
70
|
-
# FileTest -> File, Test
|
|
71
|
-
# HTTPSConnection -> HTTPS, Connection
|
|
72
|
-
word.scan(/[A-Z]+(?=[A-Z][a-z]|\b)|[A-Z][a-z]+/)
|
|
73
|
-
end
|
|
74
65
|
end
|
|
75
66
|
end
|