class User
class << self
attr_reader :passwordManagerAccountID
attr_reader :masterPassword
def session(passwordManagerAccountID , masterPassword)
@@passwordManagerAccountID = passwordManagerAccountID
@@masterPassword = masterPassword
end
end
end
User.session("sdsd" , "sdsd")
User.passwordManagerAccountID #=> no output
User.masterPassword #=> no output
I am trying to use attr_reader
on class variable but it doesn't seem to work.
I google searched but I don't seem to understand. So, if someone can explain me in simple terms the problem and its solution (without using getter and setter methods).