Class: Index
- Inherits:
-
Zarchitect
- Object
- Zarchitect
- Index
- Defined in:
- lib/zarchitect/index.rb
Constant Summary
Constants inherited from Zarchitect
Zarchitect::ASSETDIR, Zarchitect::ASSETSDIR, Zarchitect::BUILDIR, Zarchitect::CONFIGDIR, Zarchitect::DEBUGSDIR, Zarchitect::DRAFTDIR, Zarchitect::FILEDIR, Zarchitect::FILESDIR, Zarchitect::HTMLDIR, Zarchitect::LAYOUTDIR, Zarchitect::NODEDIR, Zarchitect::SHARESDIR, Zarchitect::VERSION
Instance Attribute Summary collapse
-
#pages ⇒ Object
readonly
Returns the value of attribute pages.
Instance Method Summary collapse
- #build_html ⇒ Object
-
#initialize(parent) ⇒ Index
constructor
A new instance of Index.
- #write_html ⇒ Object
Methods inherited from Zarchitect
Constructor Details
#initialize(parent) ⇒ Index
Returns a new instance of Index.
4 5 6 7 8 9 10 11 12 |
# File 'lib/zarchitect/index.rb', line 4 def initialize(parent) @pages = Array.new @parent = parent @ptype = @parent.class.to_s # index owns paginator # owns the index files which share its paginator setup_paginator setup_html end |
Instance Attribute Details
#pages ⇒ Object (readonly)
Returns the value of attribute pages.
2 3 4 |
# File 'lib/zarchitect/index.rb', line 2 def pages @pages end |
Instance Method Details
#build_html ⇒ Object
14 15 16 17 18 |
# File 'lib/zarchitect/index.rb', line 14 def build_html @html.each do |h| h.compose end end |
#write_html ⇒ Object
20 21 22 23 24 25 |
# File 'lib/zarchitect/index.rb', line 20 def write_html @html.each do |h| GPI.print "Writing index HTML.", GPI::CLU.check_option('v') h.write end end |