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
375 376 377 |
# File 'lib/deplate/common.rb', line 375 def accum @accum end |
#indent ⇒ Object
Returns the value of attribute indent.
377 378 379 |
# File 'lib/deplate/common.rb', line 377 def indent @indent end |
#regNote ⇒ Object (readonly)
Returns the value of attribute regNote.
376 377 378 |
# File 'lib/deplate/common.rb', line 376 def regNote @regNote end |
#top_heading ⇒ Object
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.. @registered_metadata << @deplate.(source, ) end end |
#format_as_string ⇒ Object
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
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 |