Class: Guider::Config
- Inherits:
-
Object
- Object
- Guider::Config
- Defined in:
- lib/guider/config.rb
Overview
Reads the guides config file. Turns it into HTML table of contents.
Instance Method Summary collapse
-
#initialize(path) ⇒ Config
constructor
A new instance of Config.
-
#to_html ⇒ Object
Returns HTML list of guide titles.
Constructor Details
#initialize(path) ⇒ Config
Returns a new instance of Config.
7 8 9 |
# File 'lib/guider/config.rb', line 7 def initialize(path) @guides = JSON.parse(IO.read(path)) end |
Instance Method Details
#to_html ⇒ Object
Returns HTML list of guide titles.
12 13 14 |
# File 'lib/guider/config.rb', line 12 def to_html to_list(@guides) end |