I want to add an attribute to my method from another class. I know how to work with attr_accessor
but how does it work if the method has arguments?
class A
attr_accessor :method # gives me wrong number of arguments
attr_accessor :method(a,b,c) # gives me syntax error
def method(a,b,c)
print a
end
end
a_class=A.new
a_class.method(5,3,2)