Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/attributary/core_ext.rb

Instance Method Summary collapse

Instance Method Details

#constantizeObject



3
4
5
# File 'lib/attributary/core_ext.rb', line 3

def constantize
  Object.const_get(self)
end

#safe_constantizeObject



9
10
11
12
13
# File 'lib/attributary/core_ext.rb', line 9

def safe_constantize
  constantize
rescue StandardError
  nil
end