Ruby Singleton Objects

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 https://rubyonrails.ba/single/ruby-singleton-objects

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles