Class: Translatomatic::ResourceFile::PO::PoProperty
- Inherits:
-
Object
- Object
- Translatomatic::ResourceFile::PO::PoProperty
- Defined in:
- lib/translatomatic/resource_file/po.rb
Instance Attribute Summary collapse
-
#entry ⇒ Object
readonly
Returns the value of attribute entry.
-
#value_index ⇒ Object
readonly
Returns the value of attribute value_index.
Instance Method Summary collapse
-
#initialize(entry, value_index) ⇒ PoProperty
constructor
A new instance of PoProperty.
- #value ⇒ Object
Constructor Details
#initialize(entry, value_index) ⇒ PoProperty
Returns a new instance of PoProperty.
57 58 59 60 |
# File 'lib/translatomatic/resource_file/po.rb', line 57 def initialize(entry, value_index) @entry = entry @value_index = value_index end |
Instance Attribute Details
#entry ⇒ Object (readonly)
Returns the value of attribute entry.
54 55 56 |
# File 'lib/translatomatic/resource_file/po.rb', line 54 def entry @entry end |
#value_index ⇒ Object (readonly)
Returns the value of attribute value_index.
55 56 57 |
# File 'lib/translatomatic/resource_file/po.rb', line 55 def value_index @value_index end |
Instance Method Details
#value ⇒ Object
62 63 64 65 66 67 68 |
# File 'lib/translatomatic/resource_file/po.rb', line 62 def value if entry.plural? entry.msgstr[value_index] else entry.msgstr end end |