Sha256: cd8015470cde610a4118b03f7a83650d45e4cdccdb6dc7c33683d54f77eee53b

Contents?: true

Size: 447 Bytes

Versions: 3

Compression:

Stored size: 447 Bytes

Contents

module Vedeu

  # A module for common methods used throughout Vedeu.
  #
  module Common

    # Returns a boolean indicating whether a variable has a useful value.
    #
    # @param variable [String|Symbol|Array|Fixnum] The variable to check.
    # @return [Boolean]
    def present?(variable)
      return true if variable.is_a?(Fixnum)
      return true unless variable.nil? || variable.empty?

      false
    end

  end # Common

end # Vedeu

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
vedeu-0.4.32 lib/vedeu/support/common.rb
vedeu-0.4.31 lib/vedeu/support/common.rb
vedeu-0.4.30 lib/vedeu/support/common.rb