Class: CukeSlicer::TagCollection

Inherits:
Object
  • Object
show all
Includes:
Helpers
Defined in:
lib/cuke_slicer/collections/tag_collection.rb

Overview

private

Instance Method Summary collapse

Methods included from Helpers

#path?, #str_regex?, #str_regex_arr?, #tag?

Constructor Details

#initialize(parameters) ⇒ TagCollection

Returns a new instance of TagCollection.



14
15
16
# File 'lib/cuke_slicer/collections/tag_collection.rb', line 14

def initialize(parameters)
  self.filter_values = parameters
end

Instance Method Details

#validateObject

private



19
20
21
22
23
24
# File 'lib/cuke_slicer/collections/tag_collection.rb', line 19

def validate
  filter_values.each do |val|
    raise(ArgumentError, "Filter '#{val}' must be a String, Regexp, or Array. Got #{val.class}") unless str_regex_arr?(val) # rubocop:disable Metrics/LineLength
    NestedTagCollection.new(val).validate if val.is_a?(Array)
  end
end