Ruby is a dynamic language, that’s why you won’t get compile time type warnings/errors as you get in languages like C#.
Ruby has a lot of metaprogramming features allowing you to create your own custom methods on the fly which can be used the same as att_accessor.