YAML::DomainType (Class)

In: yaml/types.rb
Parent: Object

Default domain type

Methods

new   to_yaml   to_yaml_type  

Attributes

domain  [RW] 
type_id  [RW] 
value  [RW] 

Public Class methods

[Source]

# File yaml/types.rb, line 28
                def initialize( domain, type, val )
                        @domain = domain; @type_id = type; @value = val
                end

Public Instance methods

[Source]

# File yaml/types.rb, line 38
                def to_yaml( opts = {} )
                        YAML::quick_emit( self.object_id, opts ) { |out|
                                out << " !#{to_yaml_type} "
                                value.to_yaml( :Emitter => out )
                        }
                end

[Source]

# File yaml/types.rb, line 31
        def to_yaml_type
            dom = @domain.dup
            if dom =~ /\.yaml\.org,2002$/
                dom = $`
            end
            "#{dom}/#{@type_id}"
        end

[Validate]