Class: Guider::Index
- Inherits:
-
Object
- Object
- Guider::Index
- Defined in:
- lib/guider/index.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ Index
constructor
A new instance of Index.
- #write ⇒ Object
Constructor Details
#initialize(options) ⇒ Index
Returns a new instance of Index.
6 7 8 9 10 |
# File 'lib/guider/index.rb', line 6 def initialize() @options = @config = Config.new(@options[:index]) @tpl = DefaultTemplate.new(@options[:tpl_dir] + "/index.html", @options) end |
Instance Method Details
#write ⇒ Object
12 13 14 15 16 17 |
# File 'lib/guider/index.rb', line 12 def write html = @tpl.apply({ :content => @config.to_html, }) File.open(@options[:output] + "/index.html", 'w') {|f| f.write(html) } end |