Top Level Namespace

Defined Under Namespace

Modules: Kernel Classes: Numeric, OCI8, OCIBreak, OCIError, OCIException, OCIHandle, OCIInvalidHandle, OCINoData, OCISuccessWithInfo, OraDate, OraNumber, String

Constant Summary collapse

RUBY_OCI8_VERSION =
File.read("#{File.dirname(__FILE__)}/../../VERSION").chomp

Instance Method Summary collapse

Instance Method Details

#replace_keyword(source, target, replace) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
# File 'ext/oci8/extconf.rb', line 20

def replace_keyword(source, target, replace)
  puts "creating #{target} from #{source}"
  open(source, "rb") { |f|
    buf = f.read
    replace.each do |key, value|
      buf.gsub!('@@' + key + '@@', value)
    end
    open(target, "wb") {|fw|
      fw.write buf
    }
  }        
end