Class: Languages::Repetition Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/kuniri/language/abstract_container/structured_and_oo/repetition.rb

Overview

This class is abstract.

Repetition class handling repetition structures.

Direct Known Subclasses

Languages::Ruby::RepetitionRuby

Instance Method Summary collapse

Instance Method Details

#detect_repetition(pLine) ⇒ Object (protected)

Try to detect possible repetition in the line.

Parameters:

  • pLine

    String with possible repetition event.

Returns:

  • Return a partial string, otherwise return nil.

Raises:

  • (NotImplementedError)


20
21
22
# File 'lib/kuniri/language/abstract_container/structured_and_oo/repetition.rb', line 20

def detect_repetition(pLine)
  raise NotImplementedError
end

#get_expression(pType, pString) ⇒ Object (protected)

Try to extract the expression.

Parameters:

  • pString

    String with conditional expression.

  • pType

    Loop type.

Returns:

  • Return a partial string.

Raises:

  • (NotImplementedError)


35
36
37
# File 'lib/kuniri/language/abstract_container/structured_and_oo/repetition.rb', line 35

def get_expression(pType, pString)
  raise NotImplementedError
end

#get_repetition(pLine) ⇒ Object

Get conditional.

Parameters:

  • pLine

    String with possible repetition statement.

Returns:

  • Return an ConditionalData, otherwise return nil.

Raises:

  • (NotImplementedError)


11
12
13
# File 'lib/kuniri/language/abstract_container/structured_and_oo/repetition.rb', line 11

def get_repetition(pLine)
  raise NotImplementedError
end

#remove_unnecessary_information(pString) ⇒ Object (protected)

Take an partial result of string, and remove unnecessary informations.

Parameters:

  • pString

    Line with string.

Returns:

  • Return a string without any unnecessary information.

Raises:

  • (NotImplementedError)


42
43
44
# File 'lib/kuniri/language/abstract_container/structured_and_oo/repetition.rb', line 42

def remove_unnecessary_information(pString)
  raise NotImplementedError
end

#repetition_type(pString) ⇒ Object (protected)

Handling string type

Parameters:

  • pString

    String for find the repetition type.

Returns:

  • Return a string with the type.

Raises:

  • (NotImplementedError)


27
28
29
# File 'lib/kuniri/language/abstract_container/structured_and_oo/repetition.rb', line 27

def repetition_type(pString)
  raise NotImplementedError
end