Class: FieldMatch
- Inherits:
-
Object
- Object
- FieldMatch
- Defined in:
- lib/cless/data.rb
Overview
Similar interface to MatchData. Return the entire string as being a match.
Instance Method Summary collapse
- #[](i) ⇒ Object
-
#initialize(str) ⇒ FieldMatch
constructor
A new instance of FieldMatch.
- #post_match ⇒ Object
- #pre_match ⇒ Object
- #string ⇒ Object
Constructor Details
#initialize(str) ⇒ FieldMatch
Returns a new instance of FieldMatch.
198 |
# File 'lib/cless/data.rb', line 198 def initialize(str); @str = str; end |
Instance Method Details
#[](i) ⇒ Object
202 |
# File 'lib/cless/data.rb', line 202 def [](i); (i == 0) ? @str : nil; end |
#post_match ⇒ Object
201 |
# File 'lib/cless/data.rb', line 201 def post_match; ""; end |
#pre_match ⇒ Object
200 |
# File 'lib/cless/data.rb', line 200 def pre_match; ""; end |
#string ⇒ Object
199 |
# File 'lib/cless/data.rb', line 199 def string; @str; end |