Module: ContentfulRedis::ClassFinder
- Defined in:
- lib/contentful_redis/class_finder.rb
Class Method Summary collapse
Class Method Details
.search(type) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/contentful_redis/class_finder.rb', line 5 def self.search(type) begin "#{ContentfulRedis.configuration.model_scope}#{type.classify}".constantize rescue NameError => _e raise ContentfulRedis::Error::ClassNotFound, "Content type: #{type} is undefined" end end |