I would like to pass in a string variable that will be used as the property name.
For example, if I have the variable property_name
, which contains a string, I want to do something like this:
property :property_name, type: String, getter: ->(_) { "sample text" }
and the property name would change depending on what text I have inside the variable.
Is something like this possible? If so, what is the syntax for doing so?
Thanks for any help!