module Docks::Containers
Constants
- TOP_LEVEL_SYMBOLS
Public Class Methods
container_for(type = nil)
click to toggle source
# File lib/docks/containers.rb, line 14 def self.container_for(type = nil) if @@container_associations.empty? constants.each do |const| klass = const_get(const) @@container_associations[klass.type.to_sym] = klass if klass.respond_to?(:type) end end type.nil? ? Symbol : @@container_associations.fetch(type.to_sym, Symbol) end