class Transifex::Resource
Attributes
category[RW]
client[RW]
i18n_type[RW]
name[RW]
slug[RW]
source_language_code[RW]
Public Class Methods
new(project_slug, transifex_data)
click to toggle source
# File lib/transifex/resource.rb, line 5 def initialize(project_slug, transifex_data) @project_slug = project_slug @name = transifex_data[:name] @category = transifex_data[:category] @i18n_type = transifex_data[:i18n_type] @source_language_code = transifex_data[:source_language_code] @slug = transifex_data[:slug] end
Public Instance Methods
content()
click to toggle source
# File lib/transifex/resource.rb, line 30 def content client.get("/project/#{@project_slug}/resource/#{@slug}/content/") end
details()
click to toggle source
# File lib/transifex/resource.rb, line 14 def details @details || details! end
details!()
click to toggle source
# File lib/transifex/resource.rb, line 18 def details! @details = client.get("/project/#{@project_slug}/resource/#{@slug}?details") end
stats()
click to toggle source
# File lib/transifex/resource.rb, line 22 def stats @stats || stats! end
stats!()
click to toggle source
# File lib/transifex/resource.rb, line 26 def stats! @stats = client.get("/project/#{@project_slug}/resource/#{@slug}/stats/") end
translation(lang)
click to toggle source
# File lib/transifex/resource.rb, line 34 def translation(lang) client.get("/project/#{@project_slug}/resource/#{@slug}/translation/#{lang}/") end