Class: Guider::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/guider/config.rb

Overview

Reads the guides config file. Turns it into HTML table of contents.

Instance Method Summary collapse

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_htmlObject

Returns HTML list of guide titles.



12
13
14
# File 'lib/guider/config.rb', line 12

def to_html
  to_list(@guides)
end