Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/Olib/container.rb

Overview

for defining containers ala lootsack and using them across scripts

Instance Method Summary collapse

Instance Method Details

#is_a_defined_class?Boolean

Returns:

  • (Boolean)


10
11
12
13
14
# File 'lib/Olib/container.rb', line 10

def is_a_defined_class?
  true if self.to_class
rescue NameError
  false
end

#to_classObject



4
5
6
7
8
# File 'lib/Olib/container.rb', line 4

def to_class
  Kernel.const_get self
rescue NameError 
  nil
end