Module: Deplate::CommonElement

Included in:
BaseElement
Defined in:
lib/deplate/common.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#accumObject

accumulated lines



375
376
377
# File 'lib/deplate/common.rb', line 375

def accum
  @accum
end

#indentObject

Returns the value of attribute indent.



377
378
379
# File 'lib/deplate/common.rb', line 377

def indent
  @indent
end

#regNoteObject (readonly)

Returns the value of attribute regNote.



376
377
378
# File 'lib/deplate/common.rb', line 376

def regNote
  @regNote
end

#top_headingObject

Returns the value of attribute top_heading.



373
374
375
# File 'lib/deplate/common.rb', line 373

def top_heading
  @top_heading
end

Instance Method Details

#add_metadata(source, metadata) ⇒ Object



389
390
391
392
393
# File 'lib/deplate/common.rb', line 389

def (source, )
    if @deplate.options.
        @registered_metadata << @deplate.(source, )
    end
end

#format_as_stringObject



379
380
381
382
383
384
385
386
387
# File 'lib/deplate/common.rb', line 379

def format_as_string
    klass = self.class
    fm    = klass.formatter
    if fm
        return @deplate.formatter.format_element_as_string(fm, self)
    else
        log(["Don't know how to format an object of this class", klass], :error)
    end
end

#is_explicit?Boolean

Returns:

  • (Boolean)


395
396
397
# File 'lib/deplate/common.rb', line 395

def is_explicit?
    false
end

#update_id(opts = {}) ⇒ Object



399
400
401
402
403
# File 'lib/deplate/common.rb', line 399

def update_id(opts={})
    super do |id|
        @deplate.add_label(self, get_explicit_id, level_as_string, :anyway => true)
    end
end