Class: Swiftlocalizer::LocalizedString
- Inherits:
-
Object
- Object
- Swiftlocalizer::LocalizedString
- Defined in:
- lib/swiftlocalizer.rb
Instance Attribute Summary collapse
-
#en ⇒ Object
Returns the value of attribute en.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#ja ⇒ Object
Returns the value of attribute ja.
-
#lineno ⇒ Object
Returns the value of attribute lineno.
Instance Method Summary collapse
-
#initialize(en, ja, filename, lineno) ⇒ LocalizedString
constructor
A new instance of LocalizedString.
- #to_s ⇒ Object
- #to_short_s ⇒ Object
Constructor Details
#initialize(en, ja, filename, lineno) ⇒ LocalizedString
Returns a new instance of LocalizedString.
7 8 9 10 11 12 |
# File 'lib/swiftlocalizer.rb', line 7 def initialize(en, ja, filename, lineno) @en = en @ja = ja @filename = filename @lineno = lineno end |
Instance Attribute Details
#en ⇒ Object
Returns the value of attribute en.
13 14 15 |
# File 'lib/swiftlocalizer.rb', line 13 def en @en end |
#filename ⇒ Object
Returns the value of attribute filename.
14 15 16 |
# File 'lib/swiftlocalizer.rb', line 14 def filename @filename end |
#ja ⇒ Object
Returns the value of attribute ja.
13 14 15 |
# File 'lib/swiftlocalizer.rb', line 13 def ja @ja end |
#lineno ⇒ Object
Returns the value of attribute lineno.
14 15 16 |
# File 'lib/swiftlocalizer.rb', line 14 def lineno @lineno end |
Instance Method Details
#to_s ⇒ Object
15 16 17 |
# File 'lib/swiftlocalizer.rb', line 15 def to_s "#{@en},#{@ja},#{@filename},#{@lineno}" end |
#to_short_s ⇒ Object
19 20 21 |
# File 'lib/swiftlocalizer.rb', line 19 def to_short_s "#{@en} #{@ja} #{File.basename(@filename)}:#{@lineno}" end |