Class: Languages::Class Abstract

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

Overview

This class is abstract.

Class is an container for handling class

Direct Known Subclasses

Ruby::ClassRuby

Instance Method Summary collapse

Instance Method Details

#detect_class(pLine) ⇒ Object (protected)

Verify if line can have a class.

Parameters:

  • pLine

    Line to inspect.

Returns:

  • Returns an row string with class name, otherwise returns nil.

Raises:

  • (NotImplementedError)


21
22
23
# File 'lib/kuniri/language/abstract_container/structured_and_oo/class.rb', line 21

def detect_class(pLine)
  raise NotImplementedError
end

#get_class(pLine) ⇒ Object

Inspect line, and verify if it has a class or not.

Parameters:

  • pLine

    Line with the potential class.

Returns:

  • Return an object ClassData if it find a class in the line, otherwise return nil.

Raises:

  • (NotImplementedError)


12
13
14
# File 'lib/kuniri/language/abstract_container/structured_and_oo/class.rb', line 12

def get_class(pLine)
  raise NotImplementedError
end

#get_inheritance(pString) ⇒ Object (protected)

Check if class has an inheritance inside.

Parameters:

  • pString

    Line with the potential inheritance inside.

Returns:

  • Returns a string with the inheritance class, or return nil.

Raises:

  • (NotImplementedError)


28
29
30
# File 'lib/kuniri/language/abstract_container/structured_and_oo/class.rb', line 28

def get_inheritance(pString)
  raise NotImplementedError
end

#prepare_final_string(pString) ⇒ Object (protected)

Prepare final string before save it. Here it is the place to prune the final details in the string.

Parameters:

  • pString

    String to be improved before save it.

Returns:

  • Returns a string prepared to be saved.

Raises:

  • (NotImplementedError)


43
44
45
# File 'lib/kuniri/language/abstract_container/structured_and_oo/class.rb', line 43

def prepare_final_string(pString)
  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)


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

def remove_unnecessary_information(pString)
  raise NotImplementedError
end