Class: AsciiDocument
- Inherits:
-
Object
- Object
- AsciiDocument
- Defined in:
- lib/liquidoc.rb
Instance Method Summary collapse
- #add_attrs!(attrs) ⇒ Object
- #attributes ⇒ Object
- #index ⇒ Object
-
#initialize(map, type = 'article') ⇒ AsciiDocument
constructor
A new instance of AsciiDocument.
- #type ⇒ Object
Constructor Details
#initialize(map, type = 'article') ⇒ AsciiDocument
Returns a new instance of AsciiDocument.
345 346 347 348 349 |
# File 'lib/liquidoc.rb', line 345 def initialize map, type='article' @index = map @attributes = {} @type = type end |
Instance Method Details
#add_attrs!(attrs) ⇒ Object
355 356 357 358 |
# File 'lib/liquidoc.rb', line 355 def add_attrs! attrs raise "InvalidAttributesFormat" unless attrs.is_a?(Hash) self.attributes.merge!attrs end |
#attributes ⇒ Object
360 361 362 |
# File 'lib/liquidoc.rb', line 360 def attributes @attributes end |
#index ⇒ Object
351 352 353 |
# File 'lib/liquidoc.rb', line 351 def index @index end |
#type ⇒ Object
364 365 366 |
# File 'lib/liquidoc.rb', line 364 def type @type end |