Class: Reginald::Collection
- Inherits:
-
Array
- Object
- Array
- Reginald::Collection
- Defined in:
- lib/rack/mount/vendor/reginald/reginald/collection.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#==(other) ⇒ Object
:nodoc:.
-
#eql?(other) ⇒ Boolean
:nodoc:.
-
#freeze ⇒ Object
:nodoc:.
- #include?(char) ⇒ Boolean
- #match(char) ⇒ Object
- #to_regexp ⇒ Object
Instance Method Details
#==(other) ⇒ Object
:nodoc:
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/rack/mount/vendor/reginald/reginald/collection.rb', line 15 def ==(other) #:nodoc: case other when String other == to_s when Array super else eql?(other) end end |
#eql?(other) ⇒ Boolean
:nodoc:
26 27 28 |
# File 'lib/rack/mount/vendor/reginald/reginald/collection.rb', line 26 def eql?(other) #:nodoc: other.instance_of?(self.class) && super end |
#freeze ⇒ Object
:nodoc:
30 31 32 33 |
# File 'lib/rack/mount/vendor/reginald/reginald/collection.rb', line 30 def freeze #:nodoc: each { |e| e.freeze } super end |
#include?(char) ⇒ Boolean
11 12 13 |
# File 'lib/rack/mount/vendor/reginald/reginald/collection.rb', line 11 def include?(char) any? { |e| e.include?(char) } end |
#match(char) ⇒ Object
7 8 9 |
# File 'lib/rack/mount/vendor/reginald/reginald/collection.rb', line 7 def match(char) to_regexp.match(char) end |
#to_regexp ⇒ Object
3 4 5 |
# File 'lib/rack/mount/vendor/reginald/reginald/collection.rb', line 3 def to_regexp Regexp.compile("\\A#{to_s(true)}\\Z", flags) end |