Class: I18nFlow::Splitter::Merger
- Inherits:
-
Object
- Object
- I18nFlow::Splitter::Merger
- Defined in:
- lib/i18n_flow/splitter/merger.rb
Instance Attribute Summary collapse
-
#chunks ⇒ Object
readonly
Returns the value of attribute chunks.
Instance Method Summary collapse
-
#initialize(chunks) ⇒ Merger
constructor
A new instance of Merger.
- #perform_merge! ⇒ Object
- #root ⇒ Object
- #to_yaml ⇒ Object
Constructor Details
#initialize(chunks) ⇒ Merger
Returns a new instance of Merger.
5 6 7 |
# File 'lib/i18n_flow/splitter/merger.rb', line 5 def initialize(chunks) @chunks = chunks end |
Instance Attribute Details
#chunks ⇒ Object (readonly)
Returns the value of attribute chunks.
3 4 5 |
# File 'lib/i18n_flow/splitter/merger.rb', line 3 def chunks @chunks end |
Instance Method Details
#perform_merge! ⇒ Object
13 14 15 16 17 |
# File 'lib/i18n_flow/splitter/merger.rb', line 13 def perform_merge! chunks.each do |chunk| append_chunk(chunk) end end |
#root ⇒ Object
9 10 11 |
# File 'lib/i18n_flow/splitter/merger.rb', line 9 def root @root ||= I18nFlow::YamlAstProxy.new_root end |
#to_yaml ⇒ Object
19 20 21 |
# File 'lib/i18n_flow/splitter/merger.rb', line 19 def to_yaml root.parent.to_yaml end |