Class: AsciiDocument

Inherits:
Object
  • Object
show all
Defined in:
lib/liquidoc.rb

Instance Method Summary collapse

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

#attributesObject



360
361
362
# File 'lib/liquidoc.rb', line 360

def attributes
  @attributes
end

#indexObject



351
352
353
# File 'lib/liquidoc.rb', line 351

def index
  @index
end

#typeObject



364
365
366
# File 'lib/liquidoc.rb', line 364

def type
  @type
end