I am trying to define a set of functions where I can pass in given params.
for example, how do i do the following?
>> get_1_type("xxx")
V4_RELATIONSHIP_TYPES=[1=>2,3=>4]
V4_RELATIONSHIP_TYPES.keys.each do |key|
self.class.send(:define_method, "get_#{key}_type".downcase) do
return GuidInfo.get_or_new(PARAMS, V4_RELATIONSHIP_TYPES[key])
end
end
# i can call -> get_1_type("xxx") , and get the function called