Class: Languages::Ruby::AggregationRuby
- Inherits:
-
Aggregation
- Object
- Aggregation
- Languages::Ruby::AggregationRuby
- Defined in:
- lib/kuniri/language/ruby/aggregation_ruby.rb
Overview
Ruby Handling Ruby aggregation
Instance Method Summary collapse
-
#detect_aggregation(pLine) ⇒ Object
protected
Override.
-
#get_aggregation(pLine) ⇒ Object
Return string or nil.
Instance Method Details
#detect_aggregation(pLine) ⇒ Object (protected)
Override
25 26 27 28 29 |
# File 'lib/kuniri/language/ruby/aggregation_ruby.rb', line 25 def detect_aggregation(pLine) regexExp = /(\w*)\s*\.\s*new[\n|\s|\(]+/ return nil unless pLine =~ regexExp return pLine[regexExp, 1] end |
#get_aggregation(pLine) ⇒ Object
Return string or nil.
16 17 18 19 20 |
# File 'lib/kuniri/language/ruby/aggregation_ruby.rb', line 16 def get_aggregation(pLine) result = detect_aggregation(pLine) return nil unless result return Languages::AggregationData.new(result) end |