Class: Cockroach::FactoryGirl::Profiler
- Inherits:
-
Object
- Object
- Cockroach::FactoryGirl::Profiler
- Includes:
- Base::LoadNodes, Base::NodeStructure
- Defined in:
- lib/cockroach/fixtures/factory_girl/profiler.rb
Overview
Profiler does all the routine to fill the database.
Instance Method Summary collapse
-
#initialize(config = Cockroach.config) ⇒ Profiler
constructor
A new instance of Profiler.
-
#load ⇒ Object
This method will load all the mentioned records into database.
-
#load! ⇒ Object
This method will load all the mentioned records into database.
Methods included from Base::NodeStructure
Constructor Details
Instance Method Details
#load ⇒ Object
This method will load all the mentioned records into database
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/cockroach/fixtures/factory_girl/profiler.rb', line 16 def load unless @loaded Cockroach::FactoryGirl::Loader.load @source.each_pair do |name, structure| node = Cockroach::FactoryGirl::Node.new(name, structure) nodes[node.node_name] = node end @loaded = true end end |
#load! ⇒ Object
This method will load all the mentioned records into database
28 29 30 31 |
# File 'lib/cockroach/fixtures/factory_girl/profiler.rb', line 28 def load! load unless @loaded nodes.each_value(&:load!) end |