Class: Languages::Conditional Abstract

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

Overview

This class is abstract.

Class responsible for handling conditional instructions.

Direct Known Subclasses

Ruby::ConditionalRuby

Instance Method Summary collapse

Instance Method Details

#conditional_type(pString) ⇒ Object (protected)

Handling string type

Parameters:

  • pString

    String for find the conditional type.

Returns:

  • Return a string with the type.

Raises:

  • (NotImplementedError)


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

def conditional_type(pString)
  raise NotImplementedError
end

#detect_conditional(pLine) ⇒ Object (protected)

Try to detect possible conditional in the line.

Parameters:

  • pLine

    String with possible conditional event.

Returns:

  • Return a partial string, otherwise return nil.

Raises:

  • (NotImplementedError)


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

def detect_conditional(pLine)
  raise NotImplementedError
end

#get_conditional(pLine) ⇒ Object

Get conditional

Parameters:

  • pLine

    String with possible conditional statement.

Returns:

  • Returns an ConditionalData, otherwise return nil.

Raises:

  • (NotImplementedError)


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

def get_conditional(pLine)
  raise NotImplementedError
end

#get_expression(pString) ⇒ Object (protected)

Try to extract the expression.

Parameters:

  • pString

    String with conditional expression.

Returns:

  • Return a partial string.

Raises:

  • (NotImplementedError)


34
35
36
# File 'lib/kuniri/language/abstract_container/structured_and_oo/conditional.rb', line 34

def get_expression(pString)
  raise NotImplementedError
end