Range (Class)

In: yaml/rubytypes.rb
Parent: Object

Methods

Public Instance methods

[Source]

# File yaml/rubytypes.rb, line 387
    def is_complex_yaml?
        true
    end

[Source]

# File yaml/rubytypes.rb, line 393
        def to_yaml( opts = {} )
                YAML::quick_emit( self.object_id, opts ) { |out|
            if self.begin.is_complex_yaml? or self.end.is_complex_yaml? or not to_yaml_properties.empty?
                out.map( to_yaml_type ) { |map|
                    map.add( 'begin', self.begin )
                    map.add( 'end', self.end )
                    map.add( 'excl', self.exclude_end? )
                    to_yaml_properties.each { |m|
                        map.add( m, instance_variable_get( m ) )
                    }
                }
            else
                out << "#{ to_yaml_type } '" 
                self.begin.to_yaml(:Emitter => out)
                out << ( self.exclude_end? ? "..." : ".." )
                self.end.to_yaml(:Emitter => out)
                out << "'"
            end
                }
        end

[Source]

# File yaml/rubytypes.rb, line 390
    def to_yaml_type
        "!ruby/range#{ if self.class != ::Range; ":#{ self.class }"; end }"
    end

[Validate]