Class: StateMachine::OOStructuredFSM::AggregationState
- Inherits:
-
OOStructuredState
- Object
- OOStructuredState
- StateMachine::OOStructuredFSM::AggregationState
- Defined in:
- lib/kuniri/state_machine/OO_structured_fsm/aggregation_state.rb
Overview
Class responsible for handling aggregation state.
Instance Method Summary collapse
- #class_capture ⇒ Object
- #execute(pElementFile, pLine) ⇒ Object
- #handle_line(pLine) ⇒ Object
-
#initialize(pLanguage) ⇒ AggregationState
constructor
A new instance of AggregationState.
Methods inherited from OOStructuredState
#aggregation_capture, #attribute_capture, #comment_capture, #conditional_capture, #constructor_capture, #function_capture, #idle_capture, #include_capture, #method_capture, #module_capture, #repetition_capture, #variable_capture
Constructor Details
#initialize(pLanguage) ⇒ AggregationState
Returns a new instance of AggregationState.
12 13 14 |
# File 'lib/kuniri/state_machine/OO_structured_fsm/aggregation_state.rb', line 12 def initialize(pLanguage) @language = pLanguage end |
Instance Method Details
#class_capture ⇒ Object
21 22 23 |
# File 'lib/kuniri/state_machine/OO_structured_fsm/aggregation_state.rb', line 21 def class_capture @language.rewind_state end |
#execute(pElementFile, pLine) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/kuniri/state_machine/OO_structured_fsm/aggregation_state.rb', line 26 def execute(pElementFile, pLine) aggregationElement = @language.aggregationHandler.get_aggregation(pLine) if aggregationElement pElementFile.classes.last.aggregations.push aggregationElement @language..allAggregations.push aggregationElement end class_capture return pElementFile end |
#handle_line(pLine) ⇒ Object
17 18 |
# File 'lib/kuniri/state_machine/OO_structured_fsm/aggregation_state.rb', line 17 def handle_line(pLine) end |