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
Constructor Details
#initialize(dir) ⇒ Directory
Returns a new instance of Directory.
9 10 11 |
# File 'lib/madness/directory.rb', line 9 def initialize(dir) @dir = dir end |
Instance Attribute Details
#dir ⇒ Object (readonly)
Returns the value of attribute dir.
7 8 9 |
# File 'lib/madness/directory.rb', line 7 def dir @dir end |
Instance Method Details
#list ⇒ Object
13 14 15 |
# File 'lib/madness/directory.rb', line 13 def list @list ||= (dirs + files) end |