class RubyToUML::UMLInfoGenerator::BodyNodeWrapper
Attributes
body_node[R]
Public Class Methods
new(body_node)
click to toggle source
# File lib/ruby_to_uml/uml_info_generator/processor_helpers.rb, line 188 def initialize(body_node) @body_node = body_node end
Public Instance Methods
array_operation(&operation)
click to toggle source
# File lib/ruby_to_uml/uml_info_generator/processor_helpers.rb, line 192 def array_operation(&operation) array = [] if body_node.nil? nil elsif body_node.type == :begin body_node.children.each { |node| operation.call(node, array) } else operation.call(body_node, array) end array end
simple_operation(&operation)
click to toggle source
# File lib/ruby_to_uml/uml_info_generator/processor_helpers.rb, line 204 def simple_operation(&operation) if body_node.nil? nil elsif body_node.type == :begin body_node.children.each { |node| operation.call(node) } else operation.call(body_node) end end