Class: Cloudmaster::ActiveSetFactory
- Inherits:
-
Object
- Object
- Cloudmaster::ActiveSetFactory
show all
- Includes:
- Factory
- Defined in:
- app/active_set_factory.rb
Class Method Summary
collapse
Methods included from Factory
create_object_from_string
Class Method Details
.create(type, *params) ⇒ Object
7
8
9
10
11
12
13
14
|
# File 'app/active_set_factory.rb', line 7
def ActiveSetFactory.create(type, *params)
name = type.nil? ? 'none' : type.to_s
require 'active_set_' + name.downcase
class_name = 'ActiveSet' + name.capitalize
active_set = Factory.create_object_from_string(class_name, *params)
raise "Bad configuration -- bad active_set #{class_name}" unless active_set
active_set
end
|