Today I Learned

TIL, 2017-05-08

  • method_missing is private.
  • Add respond_to_missing for Rubocop purposes.
  • Ruby’s StringInquirer class implementation:
class StringInquirer < String

  private
    def method_missing(method_name, *arguments)
      if method_name[-1] == '?'
        self == method_name[0..-2]
      else
        super
      end
    end
end
  • Ruby frequency solutions: facets, powerpack
  • Structuring stuff is hard.
  • strip, not trim (lol java)

This project is maintained by daryllxd