Class: WolfTrans::Translation

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

Overview

Represents a translated string

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(patch_filename, string = '', autogenerate = true) ⇒ Translation

Returns a new instance of Translation.



24
25
26
27
28
# File 'lib/wolftrans.rb', line 24

def initialize(patch_filename, string='', autogenerate=true)
  @patch_filename = patch_filename
  @string = string
  @autogenerate = autogenerate
end

Instance Attribute Details

#autogenerateObject Also known as: autogenerate?

Returns the value of attribute autogenerate.



21
22
23
# File 'lib/wolftrans.rb', line 21

def autogenerate
  @autogenerate
end

#patch_filenameObject (readonly)

Returns the value of attribute patch_filename.



19
20
21
# File 'lib/wolftrans.rb', line 19

def patch_filename
  @patch_filename
end

#stringObject (readonly)

Returns the value of attribute string.



20
21
22
# File 'lib/wolftrans.rb', line 20

def string
  @string
end

Instance Method Details

#to_sObject



30
31
32
# File 'lib/wolftrans.rb', line 30

def to_s
  @string
end