Class: String

Inherits:
Object show all
Defined in:
lib/awsbase/support.rb,
lib/awsbase/support.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

Returns:

  • (Boolean)


119
120
121
# File 'lib/awsbase/support.rb', line 119

def blank?
    empty? || strip.empty?
end

#constantizeObject

:nodoc:



44
45
46
47
48
49
50
51
52
53
54
# File 'lib/awsbase/support.rb', line 44

def constantize()
  camel_cased_word = self
  names = camel_cased_word.split('::')
  names.shift if names.empty? || names.first.empty?
  
  constant = Object
  names.each do |name|
    constant = constant.const_defined?(name) ? constant.const_get(name) : constant.const_missing(name)
  end
  constant
end