class BasicObject
Treating some corner cases specifically
Public Instance Methods
axe?(topic = true)
Note that :ban?, :nay?, :nix?, :ort? might also have do the trick as alias
Alias for: dissent?
consent?(topic = true)
click to toggle source
Consent tacitely mean “compared to truth” when no topic is given
# File lib/englishest.rb, line 145 def consent?(topic = true) equal? topic end
Also aliased as: nod?
dissent?(topic = true)
click to toggle source
Opposite of consent, although this is implemented as a fully automous determination, which inter alia avoid some technical convonlutions
# File lib/englishest.rb, line 152 def dissent?(topic = true) !equal?(topic) end
positive?()
click to toggle source
Alternative to the double bang prefix notation returning the result of transtyping anything to either true
or false
.
# File lib/englishest.rb, line 137 def positive? !!self end
spot(pattern)
click to toggle source
# File lib/englishest.rb, line 170 def spot(pattern) $LAST_PUT_LINE =~ pattern end
unknown()
click to toggle source
$LAST_READ_LINE is locally binded, to define a synonymous method of the unary prefixal matching operator which implicitely use it, the value it holds in the calling context must be retrieved by some means. Here the retained implementation is to stash the value in a global variable each time its value change.
# File lib/englishest.rb, line 166 trace_var(:$LAST_READ_LINE, proc { |nub| $LAST_PUT_LINE = nub