Class: Coradoc::Document::Header

Inherits:
Object
  • Object
show all
Defined in:
lib/coradoc/document/header.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title, options = {}) ⇒ Header

Returns a new instance of Header.



5
6
7
8
9
# File 'lib/coradoc/document/header.rb', line 5

def initialize(title, options = {})
  @title = title
  @author = options.fetch(:author, nil)
  @revision = options.fetch(:revision, nil)
end

Instance Attribute Details

#authorObject (readonly)

Returns the value of attribute author.



3
4
5
# File 'lib/coradoc/document/header.rb', line 3

def author
  @author
end

#revisionObject (readonly)

Returns the value of attribute revision.



3
4
5
# File 'lib/coradoc/document/header.rb', line 3

def revision
  @revision
end

#titleObject (readonly)

Returns the value of attribute title.



3
4
5
# File 'lib/coradoc/document/header.rb', line 3

def title
  @title
end