class ActiveRecordCopy::TempBuffer
Public Class Methods
new()
click to toggle source
# File lib/activerecord-copy/temp_buffer.rb, line 3 def initialize @st = ''.force_encoding(ASCII_8BIT_ENCODING) end
Public Instance Methods
empty?()
click to toggle source
# File lib/activerecord-copy/temp_buffer.rb, line 34 def empty? @st.empty? end
pos()
click to toggle source
# File lib/activerecord-copy/temp_buffer.rb, line 26 def pos @st.bytesize end
read()
click to toggle source
# File lib/activerecord-copy/temp_buffer.rb, line 22 def read @st end
reopen()
click to toggle source
# File lib/activerecord-copy/temp_buffer.rb, line 18 def reopen @st = '' end
rewind()
click to toggle source
# File lib/activerecord-copy/temp_buffer.rb, line 15 def rewind end
size()
click to toggle source
# File lib/activerecord-copy/temp_buffer.rb, line 7 def size @st.bytesize end
string()
click to toggle source
# File lib/activerecord-copy/temp_buffer.rb, line 30 def string @st end
write(st)
click to toggle source
# File lib/activerecord-copy/temp_buffer.rb, line 11 def write(st) @st << st.dup.force_encoding(ASCII_8BIT_ENCODING) end