Sha256: 46a4fa392debc81e4c558e203ae9a284493e95f12acdb24378f8915de2aafc4f

Contents?: true

Size: 440 Bytes

Versions: 1

Compression:

Stored size: 440 Bytes

Contents

module Belajar
  class Unit

    attr_reader :title, :task

    def initialize(path)
      @path = path
      @title = File.basename(path).gsub(/\_+/, ' ')
    end

    def task
      @task ||= Task.new(@path)
    end

    def reference_solution
      @reference_solution ||= ReferenceSolution.new(@path)
    end

    def solution
      @solution = Solution.new(@path)
    end

    def mastered?
      solution.verified?
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
belajar-0.1.1 lib/belajar/unit.rb