lib/i18n_screwdriver/translation.rb in i18n_screwdriver-2.1.1 vs lib/i18n_screwdriver/translation.rb in i18n_screwdriver-2.2.0

- old
+ new

@@ -1,8 +1,12 @@ module I18nScrewdriver class Translation < ActiveSupport::SafeBuffer + attr_accessor :text, :options + def self.new(text, options = {}, &block) super(I18n.translate(I18nScrewdriver.for_key(text), options)).tap do |translation| + translation.text = text + translation.options = options translation.linkify(block.binding, *block.call) if block end end def linkify(binding, *urls)