开发者

Rails Model: Protected methods?

开发者 https://www.devze.com 2023-02-21 18:12 出处:网络
class demo protected def method1 end def methods2 end end Will above syntax treat bot开发者_StackOverflowh of methods as protected or only first one?Both methods will be protected
    class demo
        protected 
        def method1
        end

        def methods2
        end
    end

Will above syntax treat bot开发者_StackOverflowh of methods as protected or only first one?


Both methods will be protected

0

精彩评论

暂无评论...
验证码 换一张
取 消