Sha256: 2e9a8c81b547529057ae50b0687e242bcd12d6ea7b9233b2d79a6b26341f5586

Contents?: true

Size: 470 Bytes

Versions: 8

Compression:

Stored size: 470 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 defined_value?(variable)
      return true if variable.is_a?(Fixnum)
      return true unless variable.nil? || variable.empty?

      false
    end

  end # Common

end # Vedeu

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
vedeu-0.2.10 lib/vedeu/support/common.rb
vedeu-0.2.9 lib/vedeu/support/common.rb
vedeu-0.2.8 lib/vedeu/support/common.rb
vedeu-0.2.7 lib/vedeu/support/common.rb
vedeu-0.2.6 lib/vedeu/support/common.rb
vedeu-0.2.5 lib/vedeu/support/common.rb
vedeu-0.2.4 lib/vedeu/support/common.rb
vedeu-0.2.3 lib/vedeu/support/common.rb