Module: Omnibus::NullArgumentable

Included in:
Config, Packager::Base, Project, Software
Defined in:
lib/omnibus/null_argumentable.rb

Defined Under Namespace

Modules: ClassMethods

Constant Summary collapse

NULL =

The “empty” null object.

Returns:

  • (Object)
Object.new.freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object

Called when the module is included.

Parameters:

  • base (Object)


31
32
33
# File 'lib/omnibus/null_argumentable.rb', line 31

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

#null?(object) ⇒ Boolean

Returns:

  • (Boolean)

See Also:

  • Omnibus::NullArgumentable.(NullArgumentable(NullArgumentable.null?)


47
48
49
# File 'lib/omnibus/null_argumentable.rb', line 47

def null?(object)
  self.class.null?(object)
end