Sha256: e502c85ce37b82c5d94ab2d47b607de53e2e318c4acda37bafa0b6e64bc99fd1

Contents?: true

Size: 532 Bytes

Versions: 10

Compression:

Stored size: 532 Bytes

Contents

module Quandl
module Command
class Task

module Translations
  
  extend ActiveSupport::Concern

  included do
    
  end

  module ClassMethods
    
    def t(key)
      key = key.to_s
      translation = lang
      key.split('.').each{|m| translation = translation.respond_to?(m) ? translation.send(m) : nil }
      translation
    end
    
    def lang
      @lang ||= Quandl::Lang.send(language).quandl.command.tasks.send(command_name)
    end
    
    def language
      # stub
      'en'
    end
    
  end
  
end

end
end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
quandl-0.4.4 lib/quandl/command/task/translations.rb
quandl-0.4.3 lib/quandl/command/task/translations.rb
quandl-0.4.2 lib/quandl/command/task/translations.rb
quandl-0.4.1 lib/quandl/command/task/translations.rb
quandl-0.4.0 lib/quandl/command/task/translations.rb
quandl-0.3.7 lib/quandl/command/task/translations.rb
quandl-0.3.6 lib/quandl/command/task/translations.rb
quandl-0.3.4 lib/quandl/command/task/translations.rb
quandl-0.3.3 lib/quandl/command/task/translations.rb
quandl-0.3.0 lib/quandl/command/task/translations.rb