4 Matching Annotations
- Dec 2022
-
stackoverflow.com stackoverflow.com
-
yield is a bit of laguage level magic that only works in the context of a method.
-
- Apr 2021
-
gist.github.com gist.github.com
-
Apparently when you create a subclass, that subclass's singleton class has # its superclass's singleton class as an ancestor.
This is a good thing. It allows class methods to be inherited by subclasses.
-
- Mar 2021
-
en.wikipedia.org en.wikipedia.org
-
Title: "goal the use case is trying to satisfy"[23]:101 Main Success Scenario: numbered list of steps[23]:101 Step: "a simple statement of the interaction between the actor and a system"[23]:101 Extensions: separately numbered lists, one per Extension[23]:101 Extension: "a condition that results in different interactions from .. the main success scenario". An extension from main step 3 is numbered 3a, etc.
Not sure why I find this example so interesting.
Probably because it is a human-readable outline that uses machine-readable (programming language source code) constructs, namely loops/iteration.
The format in which this is written in, then, is itself a kind of (high-level, human-oriented) programming language.
Example:
- numbered list of steps [introduces/names the loop/iterator/enumeration being done]
- Step: "a simple statement of the interaction between the actor and a system" [defines the inner part of the loop that gets "executed" once per iteration]
- numbered list of steps [introduces/names the loop/iterator/enumeration being done]
-
- Feb 2021
-
dry-rb.org dry-rb.org
-
Another solution is using the Safe Navigation Operator &. introduced in Ruby 2.3 which is a bit better because this is a language feature rather than an opinionated runtime environment pollution
-