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:.
- #ignorecase=(ignorecase) ⇒ Object
- #include?(char) ⇒ Boolean
- #match(char) ⇒ Object
- #to_regexp ⇒ Object
Instance Method Details
#==(other) ⇒ Object
:nodoc:
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/rack/mount/vendor/reginald/reginald/collection.rb', line 20 def ==(other) #:nodoc: case other when String other == to_s when Array super else eql?(other) end end |
#eql?(other) ⇒ Boolean
:nodoc:
31 32 33 |
# File 'lib/rack/mount/vendor/reginald/reginald/collection.rb', line 31 def eql?(other) #:nodoc: other.instance_of?(self.class) && super end |
#freeze ⇒ Object
:nodoc:
35 36 37 38 |
# File 'lib/rack/mount/vendor/reginald/reginald/collection.rb', line 35 def freeze #:nodoc: each { |e| e.freeze } super end |
#ignorecase=(ignorecase) ⇒ Object
3 4 5 6 |
# File 'lib/rack/mount/vendor/reginald/reginald/collection.rb', line 3 def ignorecase=(ignorecase) each { |e| e.ignorecase = ignorecase } ignorecase end |
#include?(char) ⇒ Boolean
16 17 18 |
# File 'lib/rack/mount/vendor/reginald/reginald/collection.rb', line 16 def include?(char) any? { |e| e.include?(char) } end |
#match(char) ⇒ Object
12 13 14 |
# File 'lib/rack/mount/vendor/reginald/reginald/collection.rb', line 12 def match(char) to_regexp.match(char) end |
#to_regexp ⇒ Object
8 9 10 |
# File 'lib/rack/mount/vendor/reginald/reginald/collection.rb', line 8 def to_regexp Regexp.compile("\\A#{to_s(true)}\\Z", ) end |