Sha256: 124ea428d7380b2287c26729476700ee38486b94eeab25270ecaa6b685cc4a62

Contents?: true

Size: 453 Bytes

Versions: 16

Compression:

Stored size: 453 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 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

16 entries across 16 versions & 1 rubygems

Version Path
vedeu-0.4.29 lib/vedeu/support/common.rb
vedeu-0.4.28 lib/vedeu/support/common.rb
vedeu-0.4.27 lib/vedeu/support/common.rb
vedeu-0.4.26 lib/vedeu/support/common.rb
vedeu-0.4.25 lib/vedeu/support/common.rb
vedeu-0.4.24 lib/vedeu/support/common.rb
vedeu-0.4.23 lib/vedeu/support/common.rb
vedeu-0.4.22 lib/vedeu/support/common.rb
vedeu-0.4.21 lib/vedeu/support/common.rb
vedeu-0.4.20 lib/vedeu/support/common.rb
vedeu-0.4.19 lib/vedeu/support/common.rb
vedeu-0.4.18 lib/vedeu/support/common.rb
vedeu-0.4.17 lib/vedeu/support/common.rb
vedeu-0.4.16 lib/vedeu/support/common.rb
vedeu-0.4.15 lib/vedeu/support/common.rb
vedeu-0.4.14 lib/vedeu/support/common.rb