Ruby Singleton Objects
17-Oct-2020 2095
Here’s another freebie from the deep RubyTapas stacks. This one is about a truth of object modeling that we don’t often talk about: not every object needs to have state. If an object has no state, there’s no need to have more than one of it. And for stateless objects, having a class just to generate a single instance may be superfluous!Director’s commentary: This one first aired as episode .
Ruby Singleton Objects #ruby #rubydeveloper #rubyonrails #Singleton #Objects https://rubyonrails.ba/link/ruby-singleton-objects