class FastIgnore::GitignoreRuleRegexpBuilder
Public Instance Methods
append(value)
click to toggle source
# File lib/fast_ignore/gitignore_rule_regexp_builder.rb, line 10 def append(value) self.<<(value) self end
append_any_dir()
click to toggle source
# File lib/fast_ignore/gitignore_rule_regexp_builder.rb, line 26 def append_any_dir append('(?:.*/)?') end
append_any_non_dir()
click to toggle source
# File lib/fast_ignore/gitignore_rule_regexp_builder.rb, line 34 def append_any_non_dir append_one_non_dir append('*') end
append_character_class_close()
click to toggle source
# File lib/fast_ignore/gitignore_rule_regexp_builder.rb, line 72 def append_character_class_close append(']') end
append_character_class_dash()
click to toggle source
# File lib/fast_ignore/gitignore_rule_regexp_builder.rb, line 68 def append_character_class_dash append('-') end
append_character_class_negation()
click to toggle source
# File lib/fast_ignore/gitignore_rule_regexp_builder.rb, line 64 def append_character_class_negation append('^') end
append_character_class_open()
click to toggle source
# File lib/fast_ignore/gitignore_rule_regexp_builder.rb, line 60 def append_character_class_open append('(?!/)[') end
append_dir()
click to toggle source
# File lib/fast_ignore/gitignore_rule_regexp_builder.rb, line 22 def append_dir append('/') end
append_end_anchor()
click to toggle source
# File lib/fast_ignore/gitignore_rule_regexp_builder.rb, line 44 def append_end_anchor append('\\z') end
append_end_dir_or_anchor()
click to toggle source
# File lib/fast_ignore/gitignore_rule_regexp_builder.rb, line 56 def append_end_dir_or_anchor append('(?:/|\\z)') end
append_escaped(value)
click to toggle source
# File lib/fast_ignore/gitignore_rule_regexp_builder.rb, line 16 def append_escaped(value) return unless value append(::Regexp.escape(value)) end
append_many_non_dir()
click to toggle source
# File lib/fast_ignore/gitignore_rule_regexp_builder.rb, line 39 def append_many_non_dir append_one_non_dir append('+') end
append_one_non_dir()
click to toggle source
# File lib/fast_ignore/gitignore_rule_regexp_builder.rb, line 30 def append_one_non_dir append('[^/]') end
append_start_anchor()
click to toggle source
# File lib/fast_ignore/gitignore_rule_regexp_builder.rb, line 48 def append_start_anchor append('\\A') end
append_start_dir_or_anchor()
click to toggle source
# File lib/fast_ignore/gitignore_rule_regexp_builder.rb, line 52 def append_start_dir_or_anchor append('(?:\\A|/)') end
to_regexp()
click to toggle source
# File lib/fast_ignore/gitignore_rule_regexp_builder.rb, line 5 def to_regexp # Regexp::IGNORECASE = 1 ::Regexp.new(self, 1) end