class Transifex::Resource
Attributes
project_slug[RW]
resource_slug[RW]
Public Class Methods
new(project_slug = nil, resource_slug = nil)
click to toggle source
# File lib/transifex/resource.rb, line 9 def initialize(project_slug = nil, resource_slug = nil) raise MissingParametersError.new(["project_slug"]) if project_slug.nil? raise MissingParametersError.new(["resource_slug"]) if resource_slug.nil? @project_slug = project_slug @resource_slug = resource_slug end
Public Instance Methods
content()
click to toggle source
# File lib/transifex/resource.rb, line 25 def content Transifex::ResourceComponents::Content.new(project_slug, resource_slug) end
fetch_with_details()
click to toggle source
# File lib/transifex/resource.rb, line 20 def fetch_with_details options = {:details => true} self.fetch(options) end
source(key = nil, context = "")
click to toggle source
# File lib/transifex/resource.rb, line 37 def source(key = nil, context = "") Transifex::ResourceComponents::Source.new(project_slug, resource_slug, key, context) end
statistics()
click to toggle source
# File lib/transifex/resource.rb, line 29 def statistics Transifex::ResourceComponents::Stats.new(project_slug, resource_slug) end
translation(language_code = nil)
click to toggle source
# File lib/transifex/resource.rb, line 33 def translation(language_code = nil) Transifex::ResourceComponents::Translation.new(project_slug, resource_slug, language_code) end