Module: IOSTSdk::String
- Defined in:
- lib/iost_sdk/string.rb
Class Method Summary collapse
Class Method Details
.camelize(str) ⇒ Object
3 4 5 |
# File 'lib/iost_sdk/string.rb', line 3 def self.camelize(str) str.to_s.split('_').map(&:capitalize).join end |
.classify(fq_class_name) ⇒ Object
7 8 9 |
# File 'lib/iost_sdk/string.rb', line 7 def self.classify(fq_class_name) fq_class_name.split('::').inject(Object) { |o, c| o.const_get c } end |