Class: Transifex::Resource

Inherits:
Object
  • Object
show all
Defined in:
lib/transifex/resource.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, project) ⇒ Resource

Returns a new instance of Resource.



4
5
6
7
8
9
10
# File 'lib/transifex/resource.rb', line 4

def initialize(data, project)
  @name          = data.name
  @type          = data.i18n_type
  @slug          = data.slug
  @main_language = data.source_language_code
  @project       = project
end

Instance Attribute Details

#main_languageObject

Returns the value of attribute main_language.



3
4
5
# File 'lib/transifex/resource.rb', line 3

def main_language
  @main_language
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/transifex/resource.rb', line 3

def name
  @name
end

#projectObject

Returns the value of attribute project.



3
4
5
# File 'lib/transifex/resource.rb', line 3

def project
  @project
end

#slugObject

Returns the value of attribute slug.



3
4
5
# File 'lib/transifex/resource.rb', line 3

def slug
  @slug
end

#typeObject

Returns the value of attribute type.



3
4
5
# File 'lib/transifex/resource.rb', line 3

def type
  @type
end