Module: Tabular::Blank
- Included in:
- ColumnMapper, Columns, Row, Table
- Defined in:
- lib/tabular/blank.rb
Overview
Don’t mess with Object
Instance Method Summary collapse
-
#is_blank?(object) ⇒ Boolean
rubocop:disable Naming/PredicateName.
Instance Method Details
#is_blank?(object) ⇒ Boolean
rubocop:disable Naming/PredicateName
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/tabular/blank.rb', line 6 def is_blank?(object) # rubocop:disable Naming/PredicateName case object when NilClass true when FalseClass true when TrueClass true when String object !~ /\S/ when Numeric false else object.respond_to?(:empty?) ? object.empty? : !object end end |