lib/webtranslateit/safe/stream.rb in webtranslateit-safe-0.4.3 vs lib/webtranslateit/safe/stream.rb in webtranslateit-safe-0.4.4

- old
+ new

@@ -1,19 +1,24 @@ module WebTranslateIt + module Safe + class Stream attr_accessor :config, :backup + def initialize(config, backup) - @config, @backup = config, backup + @config = config + @backup = backup end + # FIXME: move to Backup def expand(path) - path . - gsub(/:kind\b/, @backup.kind.to_s) . - gsub(/:id\b/, @backup.id.to_s) . - gsub(/:timestamp\b/, @backup.timestamp) + path + .gsub(/:kind\b/, @backup.kind.to_s) + .gsub(/:id\b/, @backup.id.to_s) + .gsub(/:timestamp\b/, @backup.timestamp) end private def verbose? @@ -25,8 +30,11 @@ end def dry_run? config[:dry_run] end + end + end -end \ No newline at end of file + +end