Module: Deplate::CommonElement
- Included in:
- BaseElement
- Defined in:
- lib/deplate/common.rb
Instance Attribute Summary collapse
-
#accum ⇒ Object
accumulated lines.
-
#indent ⇒ Object
Returns the value of attribute indent.
-
#regNote ⇒ Object
readonly
Returns the value of attribute regNote.
-
#top_heading ⇒ Object
Returns the value of attribute top_heading.
Instance Method Summary collapse
- #add_metadata(source, metadata) ⇒ Object
- #format_as_string ⇒ Object
- #is_explicit? ⇒ Boolean
- #update_id(opts = {}) ⇒ Object
Instance Attribute Details
#accum ⇒ Object
accumulated lines
370 371 372 |
# File 'lib/deplate/common.rb', line 370 def accum @accum end |
#indent ⇒ Object
Returns the value of attribute indent.
372 373 374 |
# File 'lib/deplate/common.rb', line 372 def indent @indent end |
#regNote ⇒ Object (readonly)
Returns the value of attribute regNote.
371 372 373 |
# File 'lib/deplate/common.rb', line 371 def regNote @regNote end |
#top_heading ⇒ Object
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.. << @deplate.(source, ) end end |
#format_as_string ⇒ Object
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
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 |