Sha256: f671510b05b9bbaf03c94c11f0328a840bb8843f7abd6792781ed27282a2f341

Contents?: true

Size: 486 Bytes

Versions: 1

Compression:

Stored size: 486 Bytes

Contents

#
# Generate text output for ActiveFacts vocabularies.
#
# Copyright (c) 2007 Clifford Heath. Read the LICENSE file.
# Author: Clifford Heath.
#
module ActiveFacts
  module Generate
    class TEXT
      def initialize(vocabulary)
        @vocabulary = vocabulary
        @vocabulary = @vocabulary.Vocabulary.values[0] if ActiveFacts::Constellation === @vocabulary
      end

      def generate(out = $>)
        out.puts @vocabulary.constellation.verbalise
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
activefacts-0.6.0 lib/activefacts/generate/text.rb