class YaKassa::V3::Utilites::String
Public Class Methods
constantize(camel_cased_word)
click to toggle source
copied from activesupport/lib/active_support/inflector
# File lib/ya_kassa/v3/utilites/string.rb, line 6 def self.constantize(camel_cased_word) unless /\A(?:::)?([A-Z]\w*(?:::[A-Z]\w*)*)\z/ =~ camel_cased_word raise NameError, "#{camel_cased_word.inspect} is not a valid constant name!" end Object.module_eval("::#{$1}", __FILE__, __LINE__) end