class Encase::ContainerItemFactory

Public Class Methods

build(type, container) click to toggle source
# File lib/encase/container_item_factory.rb, line 7
def self.build(type, container)
  container_item_for(type).new(container)
end
container_item_for(type) click to toggle source
# File lib/encase/container_item_factory.rb, line 11
def self.container_item_for(type)
  case type
  when 'object' then ObjectItem
  when 'factory' then FactoryItem
  when 'singleton' then SingletonItem
  else
    ContainerItem
  end
end