class Nanoc::Int::Pattern
@api private
Public Class Methods
from(obj)
click to toggle source
# File lib/nanoc/base/entities/pattern.rb, line 4 def self.from(obj) case obj when Nanoc::Int::StringPattern, Nanoc::Int::RegexpPattern obj when String Nanoc::Int::StringPattern.new(obj) when Regexp Nanoc::Int::RegexpPattern.new(obj) else raise ArgumentError, "Do not know how to convert `#{obj.inspect}` into a Nanoc::Pattern" end end
new(_obj)
click to toggle source
# File lib/nanoc/base/entities/pattern.rb, line 17 def initialize(_obj) raise NotImplementedError end
Public Instance Methods
captures(_identifier)
click to toggle source
# File lib/nanoc/base/entities/pattern.rb, line 25 def captures(_identifier) raise NotImplementedError end
match?(_identifier)
click to toggle source
# File lib/nanoc/base/entities/pattern.rb, line 21 def match?(_identifier) raise NotImplementedError end