Class: Belajar::Task
- Inherits:
-
Object
- Object
- Belajar::Task
- Defined in:
- lib/belajar/task.rb
Instance Attribute Summary collapse
-
#markdown ⇒ Object
readonly
Returns the value of attribute markdown.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path) ⇒ Task
constructor
A new instance of Task.
Constructor Details
#initialize(path) ⇒ Task
Returns a new instance of Task.
5 6 7 8 |
# File 'lib/belajar/task.rb', line 5 def initialize(path) @path = Dir[File.join(path, '*.md')].first @markdown = File.read(@path).strip end |
Instance Attribute Details
#markdown ⇒ Object (readonly)
Returns the value of attribute markdown.
3 4 5 |
# File 'lib/belajar/task.rb', line 3 def markdown @markdown end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
3 4 5 |
# File 'lib/belajar/task.rb', line 3 def path @path end |