Class: Patterns_any
- Inherits:
-
Object
- Object
- Patterns_any
- Defined in:
- lib/magic_xml.rb
Overview
Instance Method Summary collapse
- #===(obj) ⇒ Object
-
#initialize(*patterns) ⇒ Patterns_any
constructor
A new instance of Patterns_any.
Constructor Details
#initialize(*patterns) ⇒ Patterns_any
Returns a new instance of Patterns_any.
1391 1392 1393 |
# File 'lib/magic_xml.rb', line 1391 def initialize(*patterns) @patterns = patterns end |
Instance Method Details
#===(obj) ⇒ Object
1394 1395 1396 |
# File 'lib/magic_xml.rb', line 1394 def ===(obj) @patterns.any?{|p| p === obj} end |