Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Keynote Best Practice

Keynote Best Practice

Keynote Best Practice

Yoshiaki Yoshida

May 30, 2017
Tweet

More Decks by Yoshiaki Yoshida

Other Decks in Technology

Transcript

  1. require "active_support/core_ext/regexp" class Object # An object is blank if

    it's false, empty, or a whitespace string. # For example, +false+, '', ' ', +nil+, [], and {} are all blank. # # This simplifies # # !address || address.empty? # # to # # address.blank? # # @return [true, false] def blank? respond_to?(:empty?) ? !!empty? : !self end # An object is present if it's not blank. # # @return [true, false] def present? !blank? end $ highlight -O rtf hoge2.rb | pbcopy