module NRSER::Sugar

Some sugary sweet stuff that I find nice but seems irresponsible to monkey-patch in, so it's available as refinements.

Public Instance Methods

meth() click to toggle source

Get {Method} objects using concise syntax.

@example

text = 'bee!'
['a', 'b', 'c'].any? { |char| text.meth.start_with? }

@return [NRSER::MethodMissingForwarder]

That forwards `#method_missing( symbol )` to `self.method( symbol )`.
# File lib/nrser/refinements/sugar.rb, line 33
def meth
  NRSER::MethodMissingForwarder.new do |symbol|
    self.method symbol
  end
end