Class: Madness::Directory
- Inherits:
-
Object
- Object
- Madness::Directory
- Includes:
- ServerHelper
- Defined in:
- lib/madness/directory.rb
Overview
Represents a directory with markdown file sand subflders.
Instance Attribute Summary collapse
-
#dir ⇒ Object
readonly
Returns the value of attribute dir.
Instance Method Summary collapse
-
#initialize(dir) ⇒ Directory
constructor
A new instance of Directory.
- #list ⇒ Object
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
#dir ⇒ Object (readonly)
Returns the value of attribute dir.
8 9 10 |
# File 'lib/madness/directory.rb', line 8 def dir @dir end |
Instance Method Details
#list ⇒ Object
14 15 16 |
# File 'lib/madness/directory.rb', line 14 def list @list ||= (dirs + files) end |