class Nanoc::Core::Pattern
Public Class Methods
from(obj)
click to toggle source
# File lib/nanoc/core/pattern.rb, line 9 def self.from(obj) case obj when Nanoc::Core::StringPattern, Nanoc::Core::RegexpPattern obj when String Nanoc::Core::StringPattern.new(obj) when Regexp Nanoc::Core::RegexpPattern.new(obj) when Symbol Nanoc::Core::StringPattern.new(obj.to_s) 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/core/pattern.rb, line 24 def initialize(_obj) raise NotImplementedError end
Public Instance Methods
captures(_identifier)
click to toggle source
# File lib/nanoc/core/pattern.rb, line 32 def captures(_identifier) raise NotImplementedError end
match?(_identifier)
click to toggle source
# File lib/nanoc/core/pattern.rb, line 28 def match?(_identifier) raise NotImplementedError end