Class: Encase::ContainerItemFactory
- Inherits:
-
Object
- Object
- Encase::ContainerItemFactory
- Defined in:
- lib/encase/container_item_factory.rb
Class Method Summary collapse
Class Method Details
.build(type, container) ⇒ Object
7 8 9 |
# 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) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# 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 |