Sha256: cdd56a5614a322651ee69107ab07c6931cefcbdd48aa4b3bbeb36d974a6606a8
Contents?: true
Size: 458 Bytes
Versions: 13
Compression:
Stored size: 458 Bytes
Contents
module Konacha class Spec class NotFound < StandardError end def self.all Konacha.spec_paths.map { |path| new(path) } end def self.find(path) all.select { |s| s.path.starts_with?(path) }.presence or raise NotFound end attr_accessor :path def initialize(path) @path = path end def url "/#{asset_name}" end def asset_name path.sub(/(\.js|\.coffee).*/, '') end end end
Version data entries
13 entries across 13 versions & 1 rubygems