Class: Languages::VariableGlobal Abstract

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

Overview

This class is abstract.

Any global variable should be handler here.

Direct Known Subclasses

Ruby::VariableGlobalRuby

Instance Method Summary collapse

Instance Method Details

#detect_variable(pLine) ⇒ Object (protected)

Verify if line has a variable.

Parameters:

  • pLine

    String to be analysed.

Returns:

  • Returns a partial string, if it can be a variable. Otherwise return nil.

Raises:

  • (NotImplementedError)


24
25
26
# File 'lib/kuniri/language/abstract_container/structured_and_oo/variable_global.rb', line 24

def detect_variable(pLine)
  raise NotImplementedError
end

#get_variable(pLine) ⇒ Object

This method is the main interface for extract data from specific code and convert it to a common representation.

Parameters:

  • pLine

    Line to be inspected.

Returns:

  • If line has a variable, this method returns an object of VariableGlobalData. Otherwise returns nil.

Raises:

  • (NotImplementedError)

See Also:

  • Languages::VariableGlobal.variable_global_datavariable_global_data.rb


14
15
16
# File 'lib/kuniri/language/abstract_container/structured_and_oo/variable_global.rb', line 14

def get_variable(pLine)
  raise NotImplementedError
end