Class: FileGlob::GlobMatchData
- Inherits:
-
Object
- Object
- FileGlob::GlobMatchData
- Defined in:
- lib/file_glob.rb
Overview
Interface that quacks like Regexp’s MatchData. It should cover most common cases.
Instance Attribute Summary collapse
-
#string ⇒ Object
readonly
Returns the value of attribute string.
Instance Method Summary collapse
- #[](i) ⇒ Object
- #begin(i) ⇒ Object
- #end ⇒ Object
- #intialize(string) ⇒ Object
- #names ⇒ Object
- #size ⇒ Object (also: #length)
Instance Attribute Details
#string ⇒ Object (readonly)
Returns the value of attribute string.
33 34 35 |
# File 'lib/file_glob.rb', line 33 def string @string end |
Instance Method Details
#[](i) ⇒ Object
39 40 41 42 |
# File 'lib/file_glob.rb', line 39 def [] i check_index!(i) string end |
#begin(i) ⇒ Object
44 45 46 47 |
# File 'lib/file_glob.rb', line 44 def begin(i) check_index!(i) 0 end |
#end ⇒ Object
49 50 51 52 |
# File 'lib/file_glob.rb', line 49 def end check_index!(i) string.length end |
#intialize(string) ⇒ Object
35 36 37 |
# File 'lib/file_glob.rb', line 35 def intialize(string) @string = string end |
#names ⇒ Object
60 61 62 |
# File 'lib/file_glob.rb', line 60 def names [] end |
#size ⇒ Object Also known as: length
54 55 56 |
# File 'lib/file_glob.rb', line 54 def size 1 end |