Class: Doculab::TableOfContents::Section
- Inherits:
-
Object
- Object
- Doculab::TableOfContents::Section
- Defined in:
- app/models/doculab/table_of_contents.rb
Instance Attribute Summary collapse
-
#pages ⇒ Object
readonly
Returns the value of attribute pages.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
- #build(block) ⇒ Object
-
#initialize(title) ⇒ Section
constructor
A new instance of Section.
- #page(title, options = {}) ⇒ Object
Constructor Details
#initialize(title) ⇒ Section
Returns a new instance of Section.
30 31 32 33 |
# File 'app/models/doculab/table_of_contents.rb', line 30 def initialize(title) @title = title @pages = [] end |
Instance Attribute Details
#pages ⇒ Object (readonly)
Returns the value of attribute pages.
28 29 30 |
# File 'app/models/doculab/table_of_contents.rb', line 28 def pages @pages end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
28 29 30 |
# File 'app/models/doculab/table_of_contents.rb', line 28 def title @title end |
Instance Method Details
#build(block) ⇒ Object
35 36 37 |
# File 'app/models/doculab/table_of_contents.rb', line 35 def build(block) instance_eval(&block) end |