Class: Git::Lint::Kit::FilterList

Inherits:
Object
  • Object
show all
Defined in:
lib/git/lint/kit/filter_list.rb

Overview

Represents an regular expression list which may be used as an analyzer setting.

Instance Method Summary collapse

Constructor Details

#initialize(list = Core::EMPTY_ARRAY) ⇒ FilterList

Returns a new instance of FilterList.



13
14
15
# File 'lib/git/lint/kit/filter_list.rb', line 13

def initialize list = Core::EMPTY_ARRAY
  @list = Array(list).map { |item| Regexp.new item }
end

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


17
# File 'lib/git/lint/kit/filter_list.rb', line 17

def empty? = list.empty?

#to_aObject Also known as: to_ary



19
# File 'lib/git/lint/kit/filter_list.rb', line 19

def to_a = list

#to_usageObject



23
# File 'lib/git/lint/kit/filter_list.rb', line 23

def to_usage(...) = list.to_usage(...)