Class: NWRFC::Parameter
- Inherits:
-
Object
- Object
- NWRFC::Parameter
- Defined in:
- lib/nwrfc.rb
Overview
Represents a function parameter
Instance Attribute Summary collapse
-
#handle ⇒ Object
Returns the value of attribute handle.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Parameter
constructor
Create a parameter by setting parameter attributes.
Constructor Details
#initialize(*args) ⇒ Parameter
Create a parameter by setting parameter attributes
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/nwrfc.rb', line 111 def initialize(*args) attr = args[0] @handle = NWRFCLib::RFCFuncParam.new @handle[:name] = attr[:name].cU if attr[:name] @handle[:direction] = NWRFCLib::RFC_DIRECTION[attr[:direction]] if attr[:direction] @handle[:type] = NWRFCLib::RFC_TYPE[attr[:type]] if attr[:type] @handle[:ucLength] = attr[:length] * 2 if attr[:length] @handle[:nucLength] = attr[:length] if attr[:length] @handle[:decimals] = attr[:decimals] if attr[:decimals] # TODO: Add support for type description #@handle[:typeDescHandle] @handle[:defaultValue] = attr[:defaultValue].cU if attr[:defaultValue] @handle[:parameterText] = attr[:parameterText].cU if attr[:parameterText] @handle[:optional] = abap_bool(attr[:optional]) if attr[:optional] end |
Instance Attribute Details
#handle ⇒ Object
Returns the value of attribute handle.
108 109 110 |
# File 'lib/nwrfc.rb', line 108 def handle @handle end |