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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 39b9665049405ab0b4282ca6b3834735d06baac156c0ea0054480cc10023842e
4
- data.tar.gz: 8bf024f3ac49c260c6e4c7d88b15b9cc9a7a221526ab189022a215b59d984e21
3
+ metadata.gz: 86dd15dc099779e07c4affe49696e9cd7faaf49258c1c8264252e0b36f8f3c19
4
+ data.tar.gz: '0233975a5e670ce70bf1bf1ef2b8ff41b21e1c817f8fec67cb4fb2a80203c6c5'
5
5
  SHA512:
6
- metadata.gz: 1ac3d4c5548139c0cb8671cd68d76cb3a00e1ce8d6b1dc8b9fef86dfdc7a20ca5801bc91f0c24d1a3a8ed648b55244ed33a88f406b440b8035c291f1ef2b902f
7
- data.tar.gz: eacea667fa08297976e96692c0d0b29966410745a42d51cf6752f8f8e728be117b1fb2d3b7963eed079a656f61c9076801daca049caf32dc547b91b6ca7b33f6
6
+ metadata.gz: 3f51f23623a0890d764e11d4023c5702b6d0586b0d6f61353b6eea0852ac944ffcbf8006e1a0521672dc9db5e996def42754297e67b1583330666be13e8ca5b2
7
+ data.tar.gz: 98e16ba8f4af597aa7cc6b2895b74e59188cd7b998316887ca788cd7313122f580e3335f03375ccc630ef613618875c55d4fce189acf17312622a8e8fc1d9c05
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyWords
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.0"
5
5
  end
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 :: and CamelCase
48
+ # Add the class/module name itself, split by ::
49
49
  declaration.name.to_s.split("::").each do |part|
50
- @method_names.append(*split_camel_case(part))
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_words
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Waite