Sha256: 22788825639836e0c76cfb3412526eb4d25fe612d0cb2dc268da2add8e39d7af
Contents?: true
Size: 604 Bytes
Versions: 15
Compression:
Stored size: 604 Bytes
Contents
# frozen_string_literal: true module Crunchbase # Utilities module Utilities # API Request module CbModel attr_accessor :entity_type module_function def cbobject kclass_name.new end def kclass_name @kclass_name ||= exact_kclass_object end def exact_kclass_object return entity_type if entity_type.is_a?(Class) cb_type = [ 'Crunchbase', 'Models', entity_type.split('_').map(&:capitalize).join ].join('::') Kernel.const_get("::#{cb_type}") end end end end
Version data entries
15 entries across 15 versions & 1 rubygems