Class: ZettelOutline::Outline
- Inherits:
-
Object
- Object
- ZettelOutline::Outline
- Defined in:
- lib/zettel_outline/outline.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#files(parser = OutlineParser.new) ⇒ Object
readonly
Returns the value of attribute files.
Instance Method Summary collapse
-
#initialize(content) ⇒ Outline
constructor
A new instance of Outline.
- #map_files(parser = OutlineParser.new, &block) ⇒ Object
Constructor Details
#initialize(content) ⇒ Outline
Returns a new instance of Outline.
8 9 10 |
# File 'lib/zettel_outline/outline.rb', line 8 def initialize(content) @content = content || "" end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
5 6 7 |
# File 'lib/zettel_outline/outline.rb', line 5 def content @content end |
#files(parser = OutlineParser.new) ⇒ Object (readonly)
Returns the value of attribute files.
6 7 8 |
# File 'lib/zettel_outline/outline.rb', line 6 def files @files end |
Instance Method Details
#map_files(parser = OutlineParser.new, &block) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/zettel_outline/outline.rb', line 19 def map_files(parser = OutlineParser.new, &block) if block_given? files(parser).map { |f| yield f } else to_enum(:map_files, parser) end end |