Class: Madness::Directory

Inherits:
Object
  • Object
show all
Includes:
ServerHelper
Defined in:
lib/madness/directory.rb

Overview

Represents a directory with markdown file sand subflders.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ServerHelper

#disallowed_static?, #docroot, #find_static_file, #log, #theme

Constructor Details

#initialize(dir) ⇒ Directory

Returns a new instance of Directory.



10
11
12
# File 'lib/madness/directory.rb', line 10

def initialize(dir)
  @dir = dir
end

Instance Attribute Details

#dirObject (readonly)

Returns the value of attribute dir.



8
9
10
# File 'lib/madness/directory.rb', line 8

def dir
  @dir
end

Instance Method Details

#listObject



14
15
16
# File 'lib/madness/directory.rb', line 14

def list
  @list ||= (dirs + files)
end