Class: Languages::VariableBehaviour Abstract
- Inherits:
-
Object
- Object
- Languages::VariableBehaviour
- Defined in:
- lib/kuniri/language/abstract_container/structured_and_oo/variable_behaviour.rb
Overview
This class is an abstraction for handling any element whose the
behaviour is similar to a variable. As an example, we have global variables and attributes that have some similarities.
Direct Known Subclasses
Instance Method Summary collapse
-
#handle_line_declaration(pString) ⇒ Object
protected
Handling line declaration.
-
#handle_multiple_declaration_with_comma(pString) ⇒ Object
protected
One common behaviour related with variables, is the multiple declaration separated by comma.
-
#handle_multiple_declaration_with_equal(pString) ⇒ Object
protected
Handling multiple declaration with equal.
-
#prepare_final_string(pLine) ⇒ Object
protected
Prepare final string, before save it in a container data.
-
#remove_unnecessary_information(pString) ⇒ Object
protected
Remove unnecessary information from line.
Instance Method Details
#handle_line_declaration(pString) ⇒ Object (protected)
Handling line declaration.
45 46 47 |
# File 'lib/kuniri/language/abstract_container/structured_and_oo/variable_behaviour.rb', line 45 def handle_line_declaration(pString) raise NotImplementedError end |
#handle_multiple_declaration_with_comma(pString) ⇒ Object (protected)
One common behaviour related with variables, is the multiple declaration separated by comma. This method is responsible for handling multiple line declaration separated by comma.
31 32 33 |
# File 'lib/kuniri/language/abstract_container/structured_and_oo/variable_behaviour.rb', line 31 def handle_multiple_declaration_with_comma(pString) raise NotImplementedError end |
#handle_multiple_declaration_with_equal(pString) ⇒ Object (protected)
Handling multiple declaration with equal.
38 39 40 |
# File 'lib/kuniri/language/abstract_container/structured_and_oo/variable_behaviour.rb', line 38 def handle_multiple_declaration_with_equal(pString) raise NotImplementedError end |
#prepare_final_string(pLine) ⇒ Object (protected)
Prepare final string, before save it in a container data.
22 23 24 |
# File 'lib/kuniri/language/abstract_container/structured_and_oo/variable_behaviour.rb', line 22 def prepare_final_string(pLine) raise NotImplementedError end |
#remove_unnecessary_information(pString) ⇒ Object (protected)
Remove unnecessary information from line. For example, remove everything into parenthesis or line comment.
15 16 17 |
# File 'lib/kuniri/language/abstract_container/structured_and_oo/variable_behaviour.rb', line 15 def remove_unnecessary_information(pString) raise NotImplementedError end |