javaparse 0.1.4 → 0.1.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/javaparse/java_unit.rb +5 -1
- metadata +1 -1
data/lib/javaparse/java_unit.rb
CHANGED
|
@@ -13,10 +13,14 @@ module JavaParse
|
|
|
13
13
|
@content = File.open(@file_path) { |file| file.read }
|
|
14
14
|
validate_unit
|
|
15
15
|
@head, @body = partition_unit
|
|
16
|
-
|
|
16
|
+
extract_methods
|
|
17
17
|
count_lines
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
+
def extract_methods
|
|
21
|
+
@methods = grab_methods(@body)
|
|
22
|
+
end
|
|
23
|
+
|
|
20
24
|
def method_blocks
|
|
21
25
|
return @body.split("}")[0...-1].map{ |block| JavaSection.new(block) } if (clazz? or enum?)
|
|
22
26
|
return @body.split(";")[0...-1].map{ |block| JavaSection.new(block) } if (interface?)
|