Class: Git::Lint::Kit::FilterList
- Inherits:
-
Object
- Object
- Git::Lint::Kit::FilterList
- 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
- #empty? ⇒ Boolean
-
#initialize(list = Core::EMPTY_ARRAY) ⇒ FilterList
constructor
A new instance of FilterList.
- #to_a ⇒ Object (also: #to_ary)
- #to_usage ⇒ Object
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
17 |
# File 'lib/git/lint/kit/filter_list.rb', line 17 def empty? = list.empty? |
#to_a ⇒ Object Also known as: to_ary
19 |
# File 'lib/git/lint/kit/filter_list.rb', line 19 def to_a = list |
#to_usage ⇒ Object
23 |
# File 'lib/git/lint/kit/filter_list.rb', line 23 def to_usage(...) = list.to_usage(...) |