class ActiveFacts::Generators::TEXT
Generate a text verbalisation of the metamodel constellation created for an ActiveFacts
vocabulary. Invoke as
afgen --text <file>.cql
Public Class Methods
new(vocabulary)
click to toggle source
# File lib/activefacts/generators/text.rb, line 16 def initialize(vocabulary) @vocabulary = vocabulary @vocabulary = @vocabulary.Vocabulary.values[0] if ActiveFacts::API::Constellation === @vocabulary end
Public Instance Methods
generate(out = $>)
click to toggle source
# File lib/activefacts/generators/text.rb, line 22 def generate(out = $>) out.puts @vocabulary.constellation.verbalise end