class Git::Cop::Kit::Graylist

Attributes

list[R]

Public Class Methods

new(list = []) click to toggle source

Represents a white or black regular expression list which may be used as a cop setting.

# File lib/git/cop/kit/graylist.rb, line 8
def initialize list = []
  @list = Array list
end

Public Instance Methods

empty?() click to toggle source
# File lib/git/cop/kit/graylist.rb, line 20
def empty?
  list.empty?
end
to_hint() click to toggle source
# File lib/git/cop/kit/graylist.rb, line 12
def to_hint
  to_regexp.map(&:inspect).join ", "
end
to_regexp() click to toggle source
# File lib/git/cop/kit/graylist.rb, line 16
def to_regexp
  list.map { |item| Regexp.new item }
end