i'm so new to Ruby
we can say that attr_accessor :bark
is sugar coating for
def bark
@bark
end
def bark=(val)
@bark = val
end
What would be the same when given multiple parameters is it?
attr_accessor *args
args.each { |attr|
def attr
@attr
end
def attr=(val)
@attr= val
end
}
and if so how can i use the same with initialization of all given params also
and in class_eval(Meta OOP) with dynamic attr+random_str?