Class: FieldMatch

Inherits:
Object
  • Object
show all
Defined in:
lib/cless/data.rb

Overview

Similar interface to MatchData. Return the entire string as being a match.

Instance Method Summary collapse

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_matchObject



201
# File 'lib/cless/data.rb', line 201

def post_match; ""; end

#pre_matchObject



200
# File 'lib/cless/data.rb', line 200

def pre_match; ""; end

#stringObject



199
# File 'lib/cless/data.rb', line 199

def string; @str; end