Sha256: 1fb35773daa297339595246f95e1bfcbfd97cb503004043068ba85cf429bbdd9

Contents?: true

Size: 379 Bytes

Versions: 2

Compression:

Stored size: 379 Bytes

Contents


module Antrapol
  module ToolRack
    module ConditionUtils

      def is_empty?(obj)
        if obj.nil?
          true
        elsif obj.respond_to?(:empty?)
          obj.empty?
        else
          false
        end
      end # is_empty?

      def not_empty?(obj)
        !is_empty?(obj)
      end # not empty

    end # ConditionUtils
  end # MyToolRack
end # Antrapol

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
toolrack-0.4.0 lib/toolrack/condition_utils.rb
toolrack-0.3.0 lib/toolrack/condition_utils.rb