Sha256: fd23e1297b64245c97186c813b49546d230cb0ab056caf847c5440eddf435ab0
Contents?: true
Size: 525 Bytes
Versions: 1
Compression:
Stored size: 525 Bytes
Contents
module Deface module Search module ClassMethods # finds all applicable overrides for supplied template # def find(details) return [] if self.all.empty? || details.empty? virtual_path = details[:virtual_path] return [] if virtual_path.nil? [/^\//, /\.\w+\z/].each { |regex| virtual_path.gsub!(regex, '') } result = [] result << self.all[virtual_path.to_sym].try(:values) result.flatten.compact.sort_by &:sequence end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
deface-0.8.0 | lib/deface/search.rb |