javaparse 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- 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?)
|