Sha256: 374dd58e1d71ca2d8eab6e9a796472e33e6f49b887cdf3f8a72db2e2633e08af
Contents?: true
Size: 563 Bytes
Versions: 1
Compression:
Stored size: 563 Bytes
Contents
class Exercism class Submission def self.test?(file) new(file).test? end attr_reader :file def initialize(file) @file = file end def path File.expand_path(file) end def test? test_identifiers.any? do |_, suffix| file.end_with?(suffix) end end def test_identifiers { :ruby => '_test.rb', :js => '.spec.js', :elixir => '_test.exs', :clojure => '_test.clj', :python => '_test.py', :go => '_test.go', } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
exercism-0.0.26 | lib/exercism/submission.rb |