I would like to use a string as an attribute (of a class)
example:
o=Someclass.new
attr='name'
then if executing
puts o.attr
gives the error: ...attr is not a method...
any help appreciated
Erik
| SitePoint Sponsor |
I would like to use a string as an attribute (of a class)
example:
o=Someclass.new
attr='name'
then if executing
puts o.attr
gives the error: ...attr is not a method...
any help appreciated
Erik
Bookmarks