lib/tabs/resolution.rb in tabs-0.9.0 vs lib/tabs/resolution.rb in tabs-0.9.1

- old
+ new

@@ -1,7 +1,8 @@ module Tabs module Resolution + extend Resolutionable extend self def register(resolution, klass) @@resolution_classes ||= {} @@resolution_classes[resolution] = klass @@ -15,9 +16,13 @@ resolution_klass(resolution).deserialize(str) end def from_seconds(resolution, s) resolution_klass(resolution).from_seconds(s) + end + + def add(resolution, ts, num) + resolution_klass(resolution).add(ts, num) end def normalize(resolution, timestamp) resolution_klass(resolution).normalize(timestamp) end