Class: CukeSlicer::PathCollection
- Inherits:
-
Object
- Object
- CukeSlicer::PathCollection
- Includes:
- Helpers
- Defined in:
- lib/cuke_slicer/collections/path_collection.rb
Instance Method Summary collapse
-
#initialize(filter_values) ⇒ PathCollection
constructor
A new instance of PathCollection.
- #validate ⇒ Object
Methods included from Helpers
#is_path?, #is_tag?, #str_regex?, #str_regex_arr?
Constructor Details
#initialize(filter_values) ⇒ PathCollection
Returns a new instance of PathCollection.
12 13 14 |
# File 'lib/cuke_slicer/collections/path_collection.rb', line 12 def initialize filter_values self.filter_values = filter_values end |
Instance Method Details
#validate ⇒ Object
16 17 18 19 20 |
# File 'lib/cuke_slicer/collections/path_collection.rb', line 16 def validate filter_values.each do |val| raise(ArgumentError, "Filter '#{val}' must be a String or Regexp. Got #{val.class}") unless str_regex?(val) end end |