Method: StringInput.new

Defined in:
lib/extensions/crypt/crypt/stringio.rb

.new(str) ⇒ Object Also known as: open



39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/extensions/crypt/crypt/stringio.rb', line 39

def new( str )
  if block_given?
    begin
      f = super
      yield f
    ensure
      f.close if f
    end
  else
    super
  end
end