Top Level Namespace
Defined Under Namespace
Modules: RnSap, UtilHelper
Classes: Auth, Currency, PoAccount, PoAddrDelivery, PoAllVersions, PoComponents, PoCond, PoCondHeader, PoConfirmation, PoContractLimits, PoExpImpHeader, PoExpImpItem, PoExtensionOut, PoHeader, PoHistory, PoHistoryMa, PoHistoryTotals, PoInvPlanHeader, PoInvPlanItem, PoItem, PoLimits, PoPartner, PoReleaseFinal, PoSchedule, PoSerialNumber, PoServices, PoShippingExp, PoSrvAccessValues, PoTextHeader, PoTextItem, PreqAcctAssignment, PreqContractLimits, PreqGenReleaseInfo, PreqItem, PreqLimits, PreqReleaseFinal, PreqReleasePosted, PreqReleasePrerequisites, PreqServices, PreqServicesAccassValues, PreqServicesText, PreqText, RequisitionItems, Return, TableColumn
Instance Method Summary
collapse
Methods included from UtilHelper
#api_return, #log, #obj_to_s
Instance Method Details
#get_object(struct, klass) ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/helper/rfc_helper.rb', line 11
def get_object(struct, klass)
obj = klass.new
klass.instance_methods.each do |method_name|
begin
if obj.respond_to?("#{method_name}=")
unless AVOID_LIST.any? { |word| method_name.to_s.include?(word)}
value = struct[method_name]
eval("obj.#{method_name} = '#{value}'")
end
end
rescue
end
end
obj
end
|
#get_object_list(table, klass) ⇒ Object
1
2
3
4
5
6
7
8
|
# File 'lib/helper/rfc_helper.rb', line 1
def get_object_list(table, klass)
list = []
table.each do |row|
list.push(get_object(row, klass))
end
list
end
|