Sha256: d1a2b76daaa0057f1fe15e669868b6f2d8fe164f059af324571f10e850455b00

Contents?: true

Size: 237 Bytes

Versions: 12

Compression:

Stored size: 237 Bytes

Contents

module Spina
  module Embeds
  
    def self.constantize(embeddable_type)
      return nil if embeddable_type.blank?
      name = embeddable_type.camelize.demodulize.to_s
      "Spina::Embeds::#{name}".safe_constantize
    end

  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
spina-2.12.0 lib/spina/embeds.rb
spina-2.11.0 lib/spina/embeds.rb
spina-2.10.0 lib/spina/embeds.rb
spina-2.9.1 lib/spina/embeds.rb
spina-2.9.0 lib/spina/embeds.rb
spina-2.8.1 lib/spina/embeds.rb
spina-2.8.0 lib/spina/embeds.rb
spina-2.7.0 lib/spina/embeds.rb
spina-2.6.2 lib/spina/embeds.rb
spina-2.6.1 lib/spina/embeds.rb
spina-2.6.0 lib/spina/embeds.rb
spina-2.5.0 lib/spina/embeds.rb