Published News Ruby

Configuration With a Singleton Instance | Daniel P. Clark

Posted By tutorialStash on Ruby - I was considering how I might want to further implement my gem and incorporate configuration settings for it.  I wanted only one instance of my configuration and it needed to be part of my module.  So I’ve come up with a solution I like that allows me to do this and even have a true “sense” of untouchable constants.

Understanding standard streams and redirection

Posted By tutorialStash on Ruby - Every process is initialized with 3 standard file descriptors:

standard input
standard output
standard error

Standard input is read-only, while standard output and standard error are write-only.

In ruby we have both globals and constants to reference these streams:

Class Inheritance: Part 2 (Singletons and Eigens, Oh My!) - Words and Code

Posted By tutorialStash on Ruby - This blog post is part of a series on Class Inheritence. Read Part 1 here. I recently stumbled upon this line of code that totally floored me. I mean …