Class: Coradoc::Document::Header
- Inherits:
-
Object
- Object
- Coradoc::Document::Header
- Defined in:
- lib/coradoc/document/header.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
readonly
Returns the value of attribute author.
-
#revision ⇒ Object
readonly
Returns the value of attribute revision.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(title, options = {}) ⇒ Header
constructor
A new instance of Header.
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, = {}) @title = title @author = .fetch(:author, nil) @revision = .fetch(:revision, nil) end |
Instance Attribute Details
#author ⇒ Object (readonly)
Returns the value of attribute author.
3 4 5 |
# File 'lib/coradoc/document/header.rb', line 3 def @author end |
#revision ⇒ Object (readonly)
Returns the value of attribute revision.
3 4 5 |
# File 'lib/coradoc/document/header.rb', line 3 def revision @revision end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
3 4 5 |
# File 'lib/coradoc/document/header.rb', line 3 def title @title end |