Get hash keys from ouside of class/block

Hello,
I need to add a GUI to already existing code. I’m using TK.
Lets say i have a class which contains many functions. I know how to get all instance_methods of of the class and all instance_method(: ).parameters.
In many cases the parameters are keys of the hash inside a function. Is it possible to get these keys so user will pick the key he wants?

code for example:

class Aligner
def ready(size)
code = {
:Fix => 1, # 150mm
:mm200 => 2,
:mm300 => 3
}
end

Thank you!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs