Module: Vedeu::Common

Included in:
Border, Vedeu::Config::API, DSL::Interface, DSL::Keymap, DisplayBuffer, HTMLChar, Repository, Style
Defined in:
lib/vedeu/support/common.rb

Overview

A module for common methods used throughout Vedeu.

Instance Method Summary collapse

Instance Method Details

#defined_value?(variable) ⇒ Boolean

Returns a boolean indicating whether a variable has a useful value.

Parameters:

  • variable (String|Symbol|Array|Fixnum)

    The variable to check.

Returns:

  • (Boolean)


11
12
13
14
15
16
# File 'lib/vedeu/support/common.rb', line 11

def defined_value?(variable)
  return true if variable.is_a?(Fixnum)
  return true unless variable.nil? || variable.empty?

  false
end