class ActiveFacts::Generators::NULL

Generate nothing from an ActiveFacts vocabulary. This is useful to check the file can be read ok. Invoke as

afgen --null <file>.cql

Public Class Methods

new(vocabulary, *options) click to toggle source
# File lib/activefacts/generators/null.rb, line 16
def initialize(vocabulary, *options)
  @vocabulary = vocabulary
  @vocabulary = @vocabulary.Vocabulary.values[0] if ActiveFacts::API::Constellation === @vocabulary
  @tables = options.include? "tables"
  @columns = options.include? "columns"
  @indices = options.include? "indices"
end

Public Instance Methods

generate(out = $>) click to toggle source
# File lib/activefacts/generators/null.rb, line 25
def generate(out = $>)
  @vocabulary.tables if @tables || @columns || @indices
end