Better Know A Ruby Thing: On The Use of Private Methods
29-Jun-2024 365
In Ruby, a method without side effects should be public.You should only have a private method if there is a side effect such that the object will end up in a bad state if it called at the wrong time. (Also, you should try to avoid having methods that are dangerous if called at the wrong timeā¦)You are already arguing with me.To be clear, lots of very smart people disagree with me about this.
Better Know A Ruby Thing: On The Use of Private Methods #ruby #rubydeveloper #rubyonrails #Better #Thing: #Private #Methods https://rubyonrails.ba/link/better-know-a-ruby-thing-on-the-use-of-private-methods