class PTT::DataRow
Attributes
num[RW]
record[RW]
state[RW]
Public Class Methods
new(orig, dataset)
click to toggle source
# File lib/ptt/data_row.rb, line 7 def initialize(orig, dataset) @record = orig @num = dataset.index(orig) + 1 if defined? orig.current_state @state = orig.current_state end end
Public Instance Methods
method_missing(method)
click to toggle source
# File lib/ptt/data_row.rb, line 15 def method_missing(method) str = @record.send(method).to_s str.respond_to?(:force_encoding) ? str.force_encoding('utf-8') : Iconv.iconv('UTF-8', 'UTF-8', str) end
to_s()
click to toggle source
# File lib/ptt/data_row.rb, line 20 def to_s @record.send(self.to_s_attribute) end
to_s_attribute()
click to toggle source
# File lib/ptt/data_row.rb, line 24 def to_s_attribute @n.to_s end