class ActiveFacts::Generators::Transform::Surrogate

Public Class Methods

new(vocabulary, *options) click to toggle source
# File lib/activefacts/generators/transform/surrogate.rb, line 194
def initialize(vocabulary, *options)
  @vocabulary = vocabulary
end

Public Instance Methods

generate(out = $stdout) click to toggle source
# File lib/activefacts/generators/transform/surrogate.rb, line 198
def generate(out = $stdout)
  @out = out
  injections = 
    @vocabulary.tables.select do |table|
      table.needs_surrogate
    end
  injections.each do |table|
    table.inject_surrogate
  end

  @vocabulary.decide_tables
end