class BabelI18n::Base
Attributes
translation[RW]
Public Class Methods
new(text, key, &block)
click to toggle source
# File lib/babel_i18n/base.rb, line 6 def initialize(text, key, &block) @translation = BabelI18n::Translate.new(text) @translation.instance_eval(&block) if block_given? @translation.key = key end
Public Instance Methods
from(from)
click to toggle source
# File lib/babel_i18n/base.rb, line 21 def from(from) @translation.from(from) self end
to(to)
click to toggle source
# File lib/babel_i18n/base.rb, line 16 def to(to) @translation.to(to) self end
translate()
click to toggle source
# File lib/babel_i18n/base.rb, line 12 def translate @translation.translate end