Class: BasicObject
- Defined in:
- lib/englishest.rb
Overview
Treating some corner cases specifically
Instance Method Summary collapse
-
#consent?(topic = true) ⇒ Boolean
(also: #nod?)
Consent tacitely mean “compared to truth” when no topic is given.
-
#dissent?(topic = true) ⇒ Boolean
(also: #deny?, #axe?)
Opposite of consent, although this is implemented as a fully automous determination, which inter alia avoid some technical convonlutions.
-
#positive? ⇒ Boolean
(also: #good?, #ok?, #pro?)
Alternative to the double bang prefix notation returning the result of transtyping anything to either
trueorfalse. - #spot(pattern) ⇒ Object (also: #win, #reach)
Instance Method Details
#consent?(topic = true) ⇒ Boolean Also known as: nod?
Consent tacitely mean “compared to truth” when no topic is given
145 146 147 |
# File 'lib/englishest.rb', line 145 def (topic = true) equal? topic end |
#dissent?(topic = true) ⇒ Boolean Also known as: deny?, axe?
Opposite of consent, although this is implemented as a fully automous determination, which inter alia avoid some technical convonlutions
152 153 154 |
# File 'lib/englishest.rb', line 152 def dissent?(topic = true) !equal?(topic) end |
#positive? ⇒ Boolean Also known as: good?, ok?, pro?
Alternative to the double bang prefix notation returning the result of transtyping anything to either true or false.
137 138 139 |
# File 'lib/englishest.rb', line 137 def positive? !!self end |
#spot(pattern) ⇒ Object Also known as: win, reach
170 171 172 |
# File 'lib/englishest.rb', line 170 def spot(pattern) $LAST_PUT_LINE =~ pattern end |