Sha256: 956bf4c95fff5a293d6f253af49d10285128d5435f0d98c0f6f02032ce0af258
Contents?: true
Size: 712 Bytes
Versions: 11
Compression:
Stored size: 712 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
Version data entries
11 entries across 11 versions & 1 rubygems