sym_tbl_gsub.rb

Path: lib/sym_tbl_gsub.rb
Last Update: Mon Oct 09 16:59:22 +0200 2006
Author:Nicolas Pouillard <ertai@lrde.epita.fr>.
Copyright:Copyright (c) 2005 Nicolas Pouillard. All rights reserved.
License:Ruby License
Revision:$Id: /w/fey/ruby_ex/trunk/lib/sym_tbl_gsub.rb 24385 2006-07-09T17:01:58.280788Z ertai $

Methods

Public Instance methods

[Source]

# File lib/sym_tbl_gsub.rb, line 234
  def add_matching (pattern )
    @pending_reject ||= []
    if defined? @symtbl and @symtbl
      pattern = pattern.do_symtbl_gsub(@symtbl)
    else
      if pattern.to_s =~ /<<.*>>/ and not @pending_reject.include? pattern
        @pending_reject << pattern
        return
      end
    end
    add_matching_without_expand pattern
  end

[Source]

# File lib/sym_tbl_gsub.rb, line 130
  def symtbl_gsub ( symtbl )
    dup.symtbl_gsub!(symtbl)
  end

[Source]

# File lib/sym_tbl_gsub.rb, line 258
  def symtbl_gsub ( symtbl )
    dup.symtbl_gsub!(symtbl)
  end

[Source]

# File lib/sym_tbl_gsub.rb, line 248
  def symtbl_gsub! ( symtbl )
    @pending_add += @pending_reject if defined? @pending_reject
    @pending_reject = []
    @pending = ! @pending_add.empty?
    @symtbl = symtbl
    map! { |path| path.do_symtbl_gsub(symtbl) }
    @symtbl = nil
    self
  end

[Source]

# File lib/sym_tbl_gsub.rb, line 123
  def symtbl_gsub! ( symtbl )
    new_local = @local.symtbl_gsub(symtbl)
    return nil if new_local.nil?
    @local = new_local
    self
  end

[Validate]