Module: RubyToUML::UMLInfoGenerator
- Defined in:
- lib/ruby_to_uml/uml_info_generator/info_classes.rb,
lib/ruby_to_uml/uml_info_generator/ast_processor.rb,
lib/ruby_to_uml/uml_info_generator/processor_helpers.rb,
lib/ruby_to_uml/uml_info_generator/uml_info_generator.rb
Defined Under Namespace
Modules: ClassAndRelationshipsProcessor, ModuleProcesor, ProcessorHelpers
Classes: ASTProcessor, BodyNodeWrapper, ClassInfo, InstanceMethodInfo, ModuleInfo, NodeFinder, RelationshipInfo, SingletonMethodInfo, UMLInfo
Class Method Summary
collapse
Class Method Details
.process_code(code) ⇒ Object
30
31
32
33
|
# File 'lib/ruby_to_uml/uml_info_generator/uml_info_generator.rb', line 30
def self.process_code(code)
top_level_node = Parser::CurrentRuby.parse(code)
parse_ast_to_uml_info(top_level_node)
end
|
.process_file(file_path) ⇒ Object
25
26
27
28
|
# File 'lib/ruby_to_uml/uml_info_generator/uml_info_generator.rb', line 25
def self.process_file(file_path)
top_level_node = Parser::CurrentRuby.parse_file(file_path)
parse_ast_to_uml_info(top_level_node)
end
|
.process_files(file_paths) ⇒ Object
9
10
11
12
13
14
15
|
# File 'lib/ruby_to_uml/uml_info_generator/uml_info_generator.rb', line 9
def self.process_files(file_paths)
uml_infos = file_paths.each_with_object([]) do |file_path, uml_infos|
uml_infos << process_file(file_path)
end
uml_infos.reduce(:merge)
end
|
.process_multiple_code_snippets(code_snippets) ⇒ Object
17
18
19
20
21
22
23
|
# File 'lib/ruby_to_uml/uml_info_generator/uml_info_generator.rb', line 17
def self.process_multiple_code_snippets(code_snippets)
uml_infos = code_snippets.each_with_object([]) do |code, uml_infos|
uml_infos << process_code(code)
end
uml_infos.reduce(:merge)
end
|