Class: FixtureBuilder::Builder

Inherits:
Object
  • Object
show all
Includes:
Delegations::Configuration, Delegations::Namer
Defined in:
lib/fixture_builder/builder.rb

Instance Method Summary collapse

Methods included from Delegations::Configuration

included

Methods included from Delegations::Namer

included

Constructor Details

#initialize(configuration, namer, builder_block) ⇒ Builder

Returns a new instance of Builder.



6
7
8
9
10
# File 'lib/fixture_builder/builder.rb', line 6

def initialize(configuration, namer, builder_block)
  @configuration = configuration
  @namer = namer
  @builder_block = builder_block
end

Instance Method Details

#generate!Object



12
13
14
15
16
17
18
19
# File 'lib/fixture_builder/builder.rb', line 12

def generate!
  say "Building fixtures"
  clean_out_old_data
  create_fixture_objects
  names_from_ivars!
  write_data_to_files
  after_build.call if after_build
end