what mattr_accessor rails module?


i couldn't unequivocally rails support nonetheless seems 'mattr_accessor' module inference 'attr_accessor' (getter & setter) normal flush class.



eg. class



class user
attr_accessor :name

def set_fullname
@name = "#{self.first_name} #{self.last_name}"
end
end


eg. module



module authentication
mattr_accessor :current_user

def login
@current_user = session[:user_id] || nil
end
end


this supporter slight presumption activesupport.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

using mvc, should hoop communication between views? between models?