Robot Framework Integrated Development Environment (RIDE)
robotide.lib.robot.variables.replacer.VariableReplacer Class Reference

Public Member Functions

def __init__ (self, variables)
 
def replace_list (self, items, replace_until=None, ignore_errors=False)
 Replaces variables from a list of items. More...
 
def replace_scalar (self, item, ignore_errors=False)
 Replaces variables from a scalar item. More...
 
def replace_string (self, string, ignore_errors=False)
 Replaces variables from a string. More...
 

Private Member Functions

def _cannot_have_variables (self, item)
 
def _get_dict_variable_item (self, name, variable, key)
 
def _get_list_variable_item (self, name, variable, index)
 
def _get_reserved_variable (self, splitter)
 
def _get_variable (self, splitter)
 
def _get_variable_item (self, name, variable, item)
 
def _parse_list_variable_index (self, index, support_slice=True)
 
def _replace_list (self, items, ignore_errors)
 
def _replace_list_item (self, item, ignore_errors)
 
def _replace_list_until (self, items, replace_until, ignore_errors)
 
def _replace_scalar (self, item, splitter=None, ignore_errors=False)
 
def _replace_string (self, string, splitter=None, ignore_errors=False)
 
def _yield_replaced (self, string, splitter, ignore_errors=False)
 

Private Attributes

 _variables
 

Detailed Description

Definition at line 24 of file replacer.py.

Constructor & Destructor Documentation

◆ __init__()

def robotide.lib.robot.variables.replacer.VariableReplacer.__init__ (   self,
  variables 
)

Definition at line 26 of file replacer.py.

Member Function Documentation

◆ _cannot_have_variables()

def robotide.lib.robot.variables.replacer.VariableReplacer._cannot_have_variables (   self,
  item 
)
private

Definition at line 103 of file replacer.py.

◆ _get_dict_variable_item()

def robotide.lib.robot.variables.replacer.VariableReplacer._get_dict_variable_item (   self,
  name,
  variable,
  key 
)
private

Definition at line 179 of file replacer.py.

◆ _get_list_variable_item()

def robotide.lib.robot.variables.replacer.VariableReplacer._get_list_variable_item (   self,
  name,
  variable,
  index 
)
private

Definition at line 159 of file replacer.py.

◆ _get_reserved_variable()

def robotide.lib.robot.variables.replacer.VariableReplacer._get_reserved_variable (   self,
  splitter 
)
private

Definition at line 153 of file replacer.py.

◆ _get_variable()

def robotide.lib.robot.variables.replacer.VariableReplacer._get_variable (   self,
  splitter 
)
private

Definition at line 133 of file replacer.py.

◆ _get_variable_item()

def robotide.lib.robot.variables.replacer.VariableReplacer._get_variable_item (   self,
  name,
  variable,
  item 
)
private

Definition at line 143 of file replacer.py.

◆ _parse_list_variable_index()

def robotide.lib.robot.variables.replacer.VariableReplacer._parse_list_variable_index (   self,
  index,
  support_slice = True 
)
private

Definition at line 172 of file replacer.py.

◆ _replace_list()

def robotide.lib.robot.variables.replacer.VariableReplacer._replace_list (   self,
  items,
  ignore_errors 
)
private

Definition at line 58 of file replacer.py.

◆ _replace_list_item()

def robotide.lib.robot.variables.replacer.VariableReplacer._replace_list_item (   self,
  item,
  ignore_errors 
)
private

Definition at line 66 of file replacer.py.

◆ _replace_list_until()

def robotide.lib.robot.variables.replacer.VariableReplacer._replace_list_until (   self,
  items,
  replace_until,
  ignore_errors 
)
private

Definition at line 46 of file replacer.py.

◆ _replace_scalar()

def robotide.lib.robot.variables.replacer.VariableReplacer._replace_scalar (   self,
  item,
  splitter = None,
  ignore_errors = False 
)
private

Definition at line 89 of file replacer.py.

◆ _replace_string()

def robotide.lib.robot.variables.replacer.VariableReplacer._replace_string (   self,
  string,
  splitter = None,
  ignore_errors = False 
)
private

Definition at line 114 of file replacer.py.

◆ _yield_replaced()

def robotide.lib.robot.variables.replacer.VariableReplacer._yield_replaced (   self,
  string,
  splitter,
  ignore_errors = False 
)
private

Definition at line 119 of file replacer.py.

◆ replace_list()

def robotide.lib.robot.variables.replacer.VariableReplacer.replace_list (   self,
  items,
  replace_until = None,
  ignore_errors = False 
)

Replaces variables from a list of items.

    If an item in a list is a @{list} variable its value is returned.
    Possible variables from other items are replaced using 'replace_scalar'.
    Result is always a list.

    'replace_until' can be used to limit replacing arguments to certain
    index from the beginning. Used with Run Keyword variants that only
    want to resolve some of the arguments in the beginning and pass others
    to called keywords unmodified.

Definition at line 40 of file replacer.py.

◆ replace_scalar()

def robotide.lib.robot.variables.replacer.VariableReplacer.replace_scalar (   self,
  item,
  ignore_errors = False 
)

Replaces variables from a scalar item.

    If the item is not a string it is returned as is. If it is a ${scalar}
    variable its value is returned. Otherwise variables are replaced with
    'replace_string'. Result may be any object.

Definition at line 84 of file replacer.py.

◆ replace_string()

def robotide.lib.robot.variables.replacer.VariableReplacer.replace_string (   self,
  string,
  ignore_errors = False 
)

Replaces variables from a string.

Result is always a string.

Definition at line 107 of file replacer.py.

Member Data Documentation

◆ _variables

robotide.lib.robot.variables.replacer.VariableReplacer._variables
private

Definition at line 27 of file replacer.py.


The documentation for this class was generated from the following file: