Class: Swiftlocalizer::LocalizedString

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#enObject

Returns the value of attribute en.



13
14
15
# File 'lib/swiftlocalizer.rb', line 13

def en
  @en
end

#filenameObject

Returns the value of attribute filename.



14
15
16
# File 'lib/swiftlocalizer.rb', line 14

def filename
  @filename
end

#jaObject

Returns the value of attribute ja.



13
14
15
# File 'lib/swiftlocalizer.rb', line 13

def ja
  @ja
end

#linenoObject

Returns the value of attribute lineno.



14
15
16
# File 'lib/swiftlocalizer.rb', line 14

def lineno
  @lineno
end

Instance Method Details

#to_sObject



15
16
17
# File 'lib/swiftlocalizer.rb', line 15

def to_s
  "#{@en},#{@ja},#{@filename},#{@lineno}"
end

#to_short_sObject



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

def to_short_s
  "#{@en} #{@ja} #{File.basename(@filename)}:#{@lineno}"
end