Sha256: e7dc8401d171a2b445762339d182cb5909ae6347c5488ea391cc3266f0d3e818
Contents?: true
Size: 595 Bytes
Versions: 98
Compression:
Stored size: 595 Bytes
Contents
class Exercise class << self def all exercise_names.map { |e| new(e) } end private def exercise_names FileList['exercises/*'].pathmap('%f').exclude('TRACK_HINTS.md') end end attr_reader :name alias :to_s :name def initialize(name) @name = name end def directory "exercises/#{name}/." end def example_file 'example.rb' end def testable_example_file "#{base_file_name}.rb" end def test_file "#{base_file_name}_test.rb" end private def base_file_name @_base_file_name ||= name.tr('-', '_') end end
Version data entries
98 entries across 98 versions & 1 rubygems