#MayThe4th
#MayThe4th
Any reason not to do this regularly? Feels weird to return `nil` from a constructor, but it would be darn handy a lot of times.
https://gist.github.com/davetron5000/1a6b394f4295f1b70062baab013d297f#file-new-rb
Any reason not to do this regularly? Feels weird to return `nil` from a constructor, but it would be darn handy a lot of times.
https://gist.github.com/davetron5000/1a6b394f4295f1b70062baab013d297f#file-new-rb
1 - if the argument is nil, return nil
2 - if the argument is already of the data type, return it
https://gist.github.com/davetron5000/1a6b394f4295f1b70062baab013d297f#file-factory-rb
1 - if the argument is nil, return nil
2 - if the argument is already of the data type, return it
https://gist.github.com/davetron5000/1a6b394f4295f1b70062baab013d297f#file-factory-rb
https://gist.github.com/davetron5000/e3fd4b90eadf22ca2bd192607769e918
https://gist.github.com/davetron5000/e3fd4b90eadf22ca2bd192607769e918
Their mission statement should be:
"Hit play, hear music"
Their mission statement should be:
"Hit play, hear music"
[Screenshot of rdoc showing the name of a method as 'layout (= "default")']
[Screenshot of rdoc showing the name of a method as 'layout (= "default")']
gist.github.com/davetron5000...
Kinda verbose, but you write it once and it pays dividends
gist.github.com/davetron5000...
Kinda verbose, but you write it once and it pays dividends