Class: Belajar::Task

Inherits:
Object
  • Object
show all
Defined in:
lib/belajar/task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#markdownObject (readonly)

Returns the value of attribute markdown.



3
4
5
# File 'lib/belajar/task.rb', line 3

def markdown
  @markdown
end

#pathObject (readonly)

Returns the value of attribute path.



3
4
5
# File 'lib/belajar/task.rb', line 3

def path
  @path
end