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?
deny?(topic = true)
Alias for: dissent?
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
Also aliased as: deny?, axe?
good?()
Alias for: positive?
nod?(topic = true)
Alias for: consent?
ok?()
Alias for: positive?
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
Also aliased as: good?, ok?, pro?
pro?()
Alias for: positive?
reach(pattern)
Alias for: spot
spot(pattern) click to toggle source
# File lib/englishest.rb, line 170
def spot(pattern)
  $LAST_PUT_LINE =~ pattern
end
Also aliased as: win, reach
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
win(pattern)
Alias for: spot