Sha256: 88e93702ff4f0db9ce3ec8c430ab1631ebe3b7025c0b2f7f21de38fe76f56ac7

Contents?: true

Size: 464 Bytes

Versions: 9

Compression:

Stored size: 464 Bytes

Contents

module Vedeu

  # A module for common methods used throughout Vedeu.
  #
  # @api private
  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

9 entries across 9 versions & 1 rubygems

Version Path
vedeu-0.4.41 lib/vedeu/support/common.rb
vedeu-0.4.40 lib/vedeu/support/common.rb
vedeu-0.4.39 lib/vedeu/support/common.rb
vedeu-0.4.38 lib/vedeu/support/common.rb
vedeu-0.4.37 lib/vedeu/support/common.rb
vedeu-0.4.36 lib/vedeu/support/common.rb
vedeu-0.4.35 lib/vedeu/support/common.rb
vedeu-0.4.34 lib/vedeu/support/common.rb
vedeu-0.4.33 lib/vedeu/support/common.rb