Class: Languages::Ruby::ConstructorRuby
- Inherits:
-
FunctionBehaviorRuby
- Object
- FunctionBehavior
- FunctionBehaviorRuby
- Languages::Ruby::ConstructorRuby
- Defined in:
- lib/kuniri/language/ruby/constructor_ruby.rb
Overview
Handling ruby constructor
Instance Method Summary collapse
-
#get_constructor(pLine, type = 'public') ⇒ Object
Get Ruby constructor.
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_constructor(pLine, type = 'public') ⇒ Object
Get Ruby constructor.
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/kuniri/language/ruby/constructor_ruby.rb', line 15 def get_constructor(pLine, type = 'public') result = get_function(pLine) return nil unless result return nil unless result.name =~ /initialize/ constructorData = ConstructorData.new(result.name) constructorData << result return constructorData end |