Sha256: 98e1934513abb45af4622cc60add39ce6a6a8db784be27bb52a241c153e1f728
Contents?: true
Size: 781 Bytes
Versions: 13
Compression:
Stored size: 781 Bytes
Contents
# # ActiveFacts Generators. # Generate text output (verbalise the meta-vocabulary) for ActiveFacts vocabularies. # # Copyright (c) 2009 Clifford Heath. Read the LICENSE file. # module ActiveFacts module Generate # Generate a text verbalisation of the metamodel constellation created for an ActiveFacts vocabulary. # Invoke as # afgen --text <file>.cql class TEXT private def initialize(vocabulary) @vocabulary = vocabulary @vocabulary = @vocabulary.Vocabulary.values[0] if ActiveFacts::API::Constellation === @vocabulary end public def generate(out = $>) out.puts @vocabulary.constellation.verbalise end end end end ActiveFacts::Registry.generator('text', ActiveFacts::Generate::TEXT)
Version data entries
13 entries across 13 versions & 1 rubygems