Class: GithubIndex
- Inherits:
-
Object
- Object
- GithubIndex
- Defined in:
- lib/gitindex.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #generate_index ⇒ Object
-
#initialize(base_dir = "~") ⇒ GithubIndex
constructor
A new instance of GithubIndex.
Constructor Details
#initialize(base_dir = "~") ⇒ GithubIndex
Returns a new instance of GithubIndex.
5 6 7 8 9 |
# File 'lib/gitindex.rb', line 5 def initialize(base_dir = "~") @base_dir = base_dir @path = "" @index = "" end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
3 4 5 |
# File 'lib/gitindex.rb', line 3 def path @path end |
Instance Method Details
#generate_index ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/gitindex.rb', line 11 def generate_index puts write_header puts "Reading from #{@base_dir}" process_directory(@base_dir) puts "<ul>#{@index}</ul>" puts end |