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



370
371
372
# File 'lib/deplate/common.rb', line 370

def accum
  @accum
end

#indentObject

Returns the value of attribute indent.



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

def indent
  @indent
end

#regNoteObject (readonly)

Returns the value of attribute regNote.



371
372
373
# File 'lib/deplate/common.rb', line 371

def regNote
  @regNote
end

#top_headingObject

Returns the value of attribute top_heading.



368
369
370
# File 'lib/deplate/common.rb', line 368

def top_heading
  @top_heading
end

Instance Method Details

#add_metadata(source, metadata) ⇒ Object



384
385
386
387
388
# File 'lib/deplate/common.rb', line 384

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

#format_as_stringObject



374
375
376
377
378
379
380
381
382
# File 'lib/deplate/common.rb', line 374

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)


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

def is_explicit?
    false
end

#update_id(opts = {}) ⇒ Object



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

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