Sha256: 600b72fd35578cdbfbef68b1b35c9ba12aa2b75be13498d228e20f0de5a33f2c

Contents?: true

Size: 1.78 KB

Versions: 4

Compression:

Stored size: 1.78 KB

Contents

# Copyright: Copyright 2009 Topic Maps Lab, University of Leipzig.
# License:   Apache License, Version 2.0

module RTM::IO
  # Yaml Export.
  # Each Topic Maps Construct gets a to_yaml method.
  module ToYAML

    module TopicMap
      # Returns the YAML representation of this topic map as String.
      #
      # :call-seq:
      #   to_yaml -> String
      #
      def to_yaml
        to_hash.to_yaml
      end
    end

    module Topic
      # Returns the YAML representation of this topic as String.
      #
      # :call-seq:
      #   to_yaml -> String
      #
      def to_yaml
        to_hash.to_yaml
      end
    end

    module Association
      # Returns the YAML representation of this association as String.
      #
      # :call-seq:
      #   to_yaml -> String
      #
      def to_yaml
        to_hash.to_yaml
      end
    end

    module Name
      # Returns the YAML representation of this name as String.
      #
      # :call-seq:
      #   to_yaml -> String
      #
      def to_yaml
        to_hash.to_yaml
      end
    end

    module Occurrence
      # Returns the YAML representation of this occurrence as String.
      #
      # :call-seq:
      #   to_yaml -> String
      #
      def to_yaml
        to_hash.to_yaml
      end
    end

    module Role
      # Returns the YAML representation of this role as String.
      #
      # :call-seq:
      #   to_yaml -> String
      #
      def to_yaml
        to_hash.to_yaml
      end
    end

    module Variant
      # Returns the YAML representation of this variant as String.
      #
      # :call-seq:
      #   to_yaml -> String
      #
      def to_yaml
        to_hash.to_yaml
      end
    end

    RTM.register_extension( self )
    
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rtm-0.3.1 lib/rtm/io/to_yaml.rb
rtm-0.3.0 lib/rtm/io/to_yaml.rb
rtm-0.2.1 lib/rtm/io/to_yaml.rb
rtm-0.2 lib/rtm/io/to_yaml.rb