Class: Nwiki::Core::Directory
- Inherits:
-
Object
- Object
- Nwiki::Core::Directory
- Defined in:
- lib/nwiki/core/directory.rb
Class Attribute Summary collapse
-
.encoding ⇒ Object
Returns the value of attribute encoding.
Instance Attribute Summary collapse
-
#list ⇒ Object
readonly
Returns the value of attribute list.
Instance Method Summary collapse
- #encoding ⇒ Object
-
#initialize(path, list) ⇒ Directory
constructor
A new instance of Directory.
- #title ⇒ Object
- #to_html ⇒ Object
Constructor Details
#initialize(path, list) ⇒ Directory
Returns a new instance of Directory.
10 11 12 13 14 15 |
# File 'lib/nwiki/core/directory.rb', line 10 def initialize path, list @path = path @list = list. select { |e| e =~ /\.org$/ }. map { |e| e.sub(/\.org$/){ '' } } end |
Class Attribute Details
.encoding ⇒ Object
Returns the value of attribute encoding.
5 6 7 |
# File 'lib/nwiki/core/directory.rb', line 5 def encoding @encoding end |
Instance Attribute Details
#list ⇒ Object (readonly)
Returns the value of attribute list.
8 9 10 |
# File 'lib/nwiki/core/directory.rb', line 8 def list @list end |
Instance Method Details
#encoding ⇒ Object
21 22 23 |
# File 'lib/nwiki/core/directory.rb', line 21 def encoding self.class.encoding end |
#title ⇒ Object
17 18 19 |
# File 'lib/nwiki/core/directory.rb', line 17 def title @path end |