Module: StorageRoom::Extensions::ConstDefined

Included in:
Module, Object
Defined in:
lib/storage_room/extensions/const_defined.rb

Instance Method Summary collapse

Instance Method Details

#is_constant_defined?(const) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
7
8
9
10
# File 'lib/storage_room/extensions/const_defined.rb', line 4

def is_constant_defined?(const)
  if ::RUBY_VERSION =~ /1.9/
    const_defined?(const, false)
  else
    const_defined?(const)
  end
end