Help with RUBY. Recognising field with prefix and changing its type

There are over 50 fields... I have tried the mutate filter to convert them into integer. With the filter, it works. Further, these fields are created dynamically -- so the additions can be on-the-fly taking them to more than 50 in the near future. Is there any documentation about using the ruby plugin? The ruby-filter plugin guidelines are not very clear. I am unable to understand the get/set stuff.

There is another similar query but it is unresolved.