Class: Metanorma::Release::MetadataFilter
- Inherits:
-
Object
- Object
- Metanorma::Release::MetadataFilter
- Defined in:
- lib/metanorma/release/channel_filter.rb
Instance Method Summary collapse
-
#initialize(channels: [], stages: []) ⇒ MetadataFilter
constructor
A new instance of MetadataFilter.
- #matches?(release_metadata) ⇒ Boolean
- #overlaps?(manifest_channels) ⇒ Boolean
Constructor Details
#initialize(channels: [], stages: []) ⇒ MetadataFilter
Returns a new instance of MetadataFilter.
6 7 8 9 10 11 |
# File 'lib/metanorma/release/channel_filter.rb', line 6 def initialize(channels: [], stages: []) @channels = channels.map { |c| Channel.new(c) } @stages = Set.new(stages.map(&:downcase)) @all_channels = @channels.empty? @all_stages = @stages.empty? end |
Instance Method Details
#matches?(release_metadata) ⇒ Boolean
13 14 15 |
# File 'lib/metanorma/release/channel_filter.rb', line 13 def matches?() channel_match?() && stage_match?() end |