class PathList::PathRegexpBuilder
Public Instance Methods
append_any_dir()
click to toggle source
# File lib/path_list/path_regexp_builder.rb, line 20 def append_any_dir append_unescaped('(?:.*/)?') end
append_any_non_dir()
click to toggle source
# File lib/path_list/path_regexp_builder.rb, line 28 def append_any_non_dir append_one_non_dir append_unescaped('*') end
append_character_class_close()
click to toggle source
# File lib/path_list/path_regexp_builder.rb, line 66 def append_character_class_close append_unescaped(']') end
append_character_class_dash()
click to toggle source
# File lib/path_list/path_regexp_builder.rb, line 62 def append_character_class_dash append_unescaped('-') end
append_character_class_negation()
click to toggle source
# File lib/path_list/path_regexp_builder.rb, line 58 def append_character_class_negation append_unescaped('^') end
append_character_class_open()
click to toggle source
# File lib/path_list/path_regexp_builder.rb, line 54 def append_character_class_open append_unescaped('(?!/)[') end
append_dir()
click to toggle source
# File lib/path_list/path_regexp_builder.rb, line 16 def append_dir append_unescaped('/') end
append_dir_or_end_anchor()
click to toggle source
# File lib/path_list/path_regexp_builder.rb, line 50 def append_dir_or_end_anchor append_unescaped('(?:/|\\z)') end
append_dir_or_start_anchor()
click to toggle source
# File lib/path_list/path_regexp_builder.rb, line 46 def append_dir_or_start_anchor append_unescaped('(?:\\A|/)') end
append_end_anchor()
click to toggle source
# File lib/path_list/path_regexp_builder.rb, line 38 def append_end_anchor append_unescaped('\\z') end
append_escaped(value)
click to toggle source
# File lib/path_list/path_regexp_builder.rb, line 10 def append_escaped(value) return unless value append_unescaped(::Regexp.escape(value)) end
append_many_non_dir()
click to toggle source
# File lib/path_list/path_regexp_builder.rb, line 33 def append_many_non_dir append_one_non_dir append_unescaped('+') end
append_one_non_dir()
click to toggle source
# File lib/path_list/path_regexp_builder.rb, line 24 def append_one_non_dir append_unescaped('[^/]') end
append_start_anchor()
click to toggle source
# File lib/path_list/path_regexp_builder.rb, line 42 def append_start_anchor append_unescaped('\\A') end
to_regexp()
click to toggle source
# File lib/path_list/path_regexp_builder.rb, line 5 def to_regexp # Regexp::IGNORECASE = 1 ::Regexp.new(self, 1) end
Private Instance Methods
append_unescaped(value)
click to toggle source
# File lib/path_list/path_regexp_builder.rb, line 72 def append_unescaped(value) self.<<(value) self end