class PT::DataRow
Attributes
num[RW]
owners[RW]
record[RW]
state[RW]
Public Class Methods
new(orig, dataset)
click to toggle source
# File lib/pt/data_row.rb, line 9 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
estimate()
click to toggle source
# File lib/pt/data_row.rb, line 79 def estimate @record.estimate.to_i if @record.estimate end
method_missing(method)
click to toggle source
# File lib/pt/data_row.rb, line 17 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
name()
click to toggle source
# File lib/pt/data_row.rb, line 30 def name _name = @record.name if _name.size > 15 _name[0..15] + '...' else _name end end
story_type()
click to toggle source
# File lib/pt/data_row.rb, line 63 def story_type t = @record.story_type case t when 'bug' '🐞' when 'feature' '⭐' when 'release' '🏁' when 'chore' '⚙️' else t end end
to_s()
click to toggle source
# File lib/pt/data_row.rb, line 22 def to_s @record.send(self.to_s_attribute) end
to_s_attribute()
click to toggle source
# File lib/pt/data_row.rb, line 26 def to_s_attribute @n.to_s end