class PathList::GitignoreRuleScanner

Public Instance Methods

backslash?() click to toggle source
# File lib/path_list/gitignore_rule_scanner.rb, line 25
def backslash?
  skip(/\\/)
end
character_class_end?() click to toggle source
# File lib/path_list/gitignore_rule_scanner.rb, line 5
def character_class_end?
  skip(/\]/)
end
character_class_literal() click to toggle source
# File lib/path_list/gitignore_rule_scanner.rb, line 65
def character_class_literal
  matched if scan(/[^\]\-\\]+/)
end
character_class_negation?() click to toggle source
# File lib/path_list/gitignore_rule_scanner.rb, line 13
def character_class_negation?
  skip(/\^|!/)
end
character_class_start?() click to toggle source
# File lib/path_list/gitignore_rule_scanner.rb, line 9
def character_class_start?
  skip(/\[/)
end
dash?() click to toggle source
# File lib/path_list/gitignore_rule_scanner.rb, line 61
def dash?
  skip(/-/)
end
end?() click to toggle source
# File lib/path_list/gitignore_rule_scanner.rb, line 17
def end?
  skip(/\s*\z/)
end
exclamation_mark?() click to toggle source
# File lib/path_list/gitignore_rule_scanner.rb, line 77
def exclamation_mark?
  skip(/!/)
end
hash?() click to toggle source
# File lib/path_list/gitignore_rule_scanner.rb, line 81
def hash?
  skip(/#/)
end
literal() click to toggle source
# File lib/path_list/gitignore_rule_scanner.rb, line 69
def literal
  matched if scan(%r{[^*/?\[\\\s]+})
end
next_character() click to toggle source
# File lib/path_list/gitignore_rule_scanner.rb, line 37
def next_character
  matched if scan(/./)
end
question_mark?() click to toggle source
# File lib/path_list/gitignore_rule_scanner.rb, line 57
def question_mark?
  skip(/\?/)
end
significant_whitespace() click to toggle source
# File lib/path_list/gitignore_rule_scanner.rb, line 73
def significant_whitespace
  matched if scan(/\s+(?!\s|\z)/)
end
slash?() click to toggle source
# File lib/path_list/gitignore_rule_scanner.rb, line 21
def slash?
  skip(%r{/})
end
star?() click to toggle source
# File lib/path_list/gitignore_rule_scanner.rb, line 33
def star?
  skip(/\*/)
end
star_end?() click to toggle source
# File lib/path_list/gitignore_rule_scanner.rb, line 41
def star_end?
  skip(/\*\s*\z/)
end
star_slash_end?() click to toggle source
# File lib/path_list/gitignore_rule_scanner.rb, line 49
def star_slash_end?
  skip(%r{\*/\s*\z})
end
two_star_end?() click to toggle source
# File lib/path_list/gitignore_rule_scanner.rb, line 45
def two_star_end?
  skip(/\*{2,}\s*\z/)
end
two_star_slash_end?() click to toggle source
# File lib/path_list/gitignore_rule_scanner.rb, line 53
def two_star_slash_end?
  skip(%r{\*{2,}/\s*\z})
end
two_stars?() click to toggle source
# File lib/path_list/gitignore_rule_scanner.rb, line 29
def two_stars?
  skip(/\*{2,}/)
end