Class: Languages::Ruby::MethodRuby

Inherits:
FunctionBehaviorRuby show all
Defined in:
lib/kuniri/language/ruby/method_ruby.rb

Overview

Handling ruby method

Instance Method Summary collapse

Methods inherited from FunctionBehaviorRuby

#detect_function, #get_function, #handling_default_parameter, #handling_parameter, #initialize, #remove_unnecessary_information

Methods inherited from FunctionBehavior

#detect_function, #get_function, #handling_default_parameter, #handling_parameter, #remove_unnecessary_information

Constructor Details

This class inherits a constructor from Languages::Ruby::FunctionBehaviorRuby

Instance Method Details

#get_method(pLine, type = 'public') ⇒ Object

Get Ruby method.



15
16
17
18
19
20
21
22
23
24
# File 'lib/kuniri/language/ruby/method_ruby.rb', line 15

def get_method(pLine, type = 'public')
  result = get_function(pLine)
  return nil unless result
  return nil if result.name =~ /initialize/

  methodData = MethodData.new(result.name)
  methodData << result

  return methodData
end