Sha256: 5bd6b8f97ab4543392e513a5d1cd85fe301472d02456fc060e6ff73452056be7

Contents?: true

Size: 241 Bytes

Versions: 16

Compression:

Stored size: 241 Bytes

Contents

module ClassFinder

  # Name is an underscore name string or symbol
  def find(name)
    klass = nil
    klass_name = Inflector.camelize(name)
    klass = Object.const_get(klass_name) rescue
    
    klass
  end
  module_function :find

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
gamebox-0.5.5 lib/gamebox/core/class_finder.rb
gamebox-0.5.4 lib/gamebox/core/class_finder.rb
gamebox-0.5.2 lib/gamebox/core/class_finder.rb
gamebox-0.5.1 lib/gamebox/core/class_finder.rb
gamebox-0.5.0 lib/gamebox/core/class_finder.rb
gamebox-0.4.1 lib/gamebox/core/class_finder.rb
gamebox-0.4.0 lib/gamebox/core/class_finder.rb
gamebox-0.4.0.rc11 lib/gamebox/core/class_finder.rb
gamebox-0.4.0.rc5 lib/gamebox/core/class_finder.rb
gamebox-0.4.0.rc4 lib/gamebox/core/class_finder.rb
gamebox-0.4.0.rc3 lib/gamebox/core/class_finder.rb
gamebox-0.4.0.rc2 lib/gamebox/core/class_finder.rb
gamebox-0.4.0.rc1 lib/gamebox/core/class_finder.rb
gamebox-0.3.4 lib/gamebox/class_finder.rb
gamebox-0.3.3 lib/gamebox/class_finder.rb
gamebox-0.3.2 lib/gamebox/class_finder.rb