Class: Any2Tmx::Transforms::Result
- Inherits:
-
Object
- Object
- Any2Tmx::Transforms::Result
- Defined in:
- lib/any2tmx/transforms/result.rb
Instance Attribute Summary collapse
-
#collection ⇒ Object
readonly
Returns the value of attribute collection.
-
#processed_count ⇒ Object
readonly
Returns the value of attribute processed_count.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize(source, target, collection, processed_count) ⇒ Result
constructor
A new instance of Result.
- #source_phrase_count ⇒ Object
- #write(io) ⇒ Object
Constructor Details
#initialize(source, target, collection, processed_count) ⇒ Result
Returns a new instance of Result.
6 7 8 9 10 11 |
# File 'lib/any2tmx/transforms/result.rb', line 6 def initialize(source, target, collection, processed_count) @source = source @target = target @collection = collection @processed_count = processed_count end |
Instance Attribute Details
#collection ⇒ Object (readonly)
Returns the value of attribute collection.
4 5 6 |
# File 'lib/any2tmx/transforms/result.rb', line 4 def collection @collection end |
#processed_count ⇒ Object (readonly)
Returns the value of attribute processed_count.
4 5 6 |
# File 'lib/any2tmx/transforms/result.rb', line 4 def processed_count @processed_count end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
4 5 6 |
# File 'lib/any2tmx/transforms/result.rb', line 4 def source @source end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
4 5 6 |
# File 'lib/any2tmx/transforms/result.rb', line 4 def target @target end |
Instance Method Details
#source_phrase_count ⇒ Object
13 14 15 |
# File 'lib/any2tmx/transforms/result.rb', line 13 def source_phrase_count source.traversable.size end |
#write(io) ⇒ Object
17 18 19 20 21 |
# File 'lib/any2tmx/transforms/result.rb', line 17 def write(io) Any2Tmx::TmxWriter.write( collection, source.locale, target.locale, io ) end |