Class: I18nYamlSorter::Sorter

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

Instance Method Summary collapse

Constructor Details

#initialize(io_input) ⇒ Sorter

Returns a new instance of Sorter.



3
4
5
# File 'lib/i18n_yaml_sorter/sorter.rb', line 3

def initialize(io_input)
  @io_input = io_input
end

Instance Method Details

#sortObject



7
8
9
10
11
# File 'lib/i18n_yaml_sorter/sorter.rb', line 7

def sort
  @array = break_blocks_into_array
  @current_array_index = 0
  sorted_yaml_from_blocks_array
end