Method: Origami::Object#set_indirect

Defined in:
lib/origami/object.rb

#set_indirect(bool) ⇒ Object

Sets whether the object is indirect or not. Indirect objects are allocated numbers at build time.



365
366
367
368
369
370
371
372
373
374
375
376
377
# File 'lib/origami/object.rb', line 365

def set_indirect(bool)
    unless bool == true or bool == false
        raise TypeError, "The argument must be boolean"
    end

    if bool == false
        @no = @generation = 0
        @document = nil
    end

    @indirect = bool
    self
end