module FileCharLicker
Constants
- VERSION
Public Class Methods
attach(file, encoding = nil)
click to toggle source
# File lib/file_char_licker/attach_licker.rb, line 7 def attach(file, encoding = nil) seeker = encoding.nil? \ ? Licker.new(file) \ : MbLicker.new(file, encoding) # attach variables/methods to instance file.instance_variable_set(:@file_char_licker, seeker) instance_methods_set(file) seeker end
Private Class Methods
around_lines(*args)
click to toggle source
# File lib/file_char_licker/attach_licker.rb, line 27 def around_lines(*args) @file_char_licker.around_lines(*args) end
backward_char(*args)
click to toggle source
# File lib/file_char_licker/attach_licker.rb, line 31 def backward_char(*args) @file_char_licker.backward_char(*args) end
backward_lines(*args)
click to toggle source
# File lib/file_char_licker/attach_licker.rb, line 35 def backward_lines(*args) @file_char_licker.backward_lines(*args) end
current_line(*args)
click to toggle source
# File lib/file_char_licker/attach_licker.rb, line 39 def current_line(*args) @file_char_licker.current_line(*args) end
forward_lines(*args)
click to toggle source
# File lib/file_char_licker/attach_licker.rb, line 43 def forward_lines(*args) @file_char_licker.forward_lines(*args) end
instance_methods_set(file)
click to toggle source
# File lib/file_char_licker/attach_licker.rb, line 22 def instance_methods_set(file) file.instance_eval do class << self def around_lines(*args) @file_char_licker.around_lines(*args) end def backward_char(*args) @file_char_licker.backward_char(*args) end def backward_lines(*args) @file_char_licker.backward_lines(*args) end def current_line(*args) @file_char_licker.current_line(*args) end def forward_lines(*args) @file_char_licker.forward_lines(*args) end def seek_contiguous_min(*args) @file_char_licker.seek_contiguous_min(*args) end def seek_contiguous_max(*args) @file_char_licker.seek_contiguous_max(*args) end def seek_line_head(*args) @file_char_licker.seek_line_head(*args) end end end end
seek_contiguous_max(*args)
click to toggle source
# File lib/file_char_licker/attach_licker.rb, line 51 def seek_contiguous_max(*args) @file_char_licker.seek_contiguous_max(*args) end
seek_contiguous_min(*args)
click to toggle source
# File lib/file_char_licker/attach_licker.rb, line 47 def seek_contiguous_min(*args) @file_char_licker.seek_contiguous_min(*args) end
seek_line_head(*args)
click to toggle source
# File lib/file_char_licker/attach_licker.rb, line 55 def seek_line_head(*args) @file_char_licker.seek_line_head(*args) end