Class: MultiLister

Inherits:
Lister show all
Defined in:
lib/LRH.rb

Instance Method Summary collapse

Methods inherited from Lister

#_list, #limit!, #list_array

Methods inherited from IOAble

#debug!, #debug?, #get_option, #halt!, #job=, #log, #set_option

Constructor Details

#initialize(main_lister, joiner) ⇒ MultiLister

Returns a new instance of MultiLister.



107
108
109
110
# File 'lib/LRH.rb', line 107

def initialize(main_lister, joiner)
    @basic_lister = main_lister
    @joiner = joiner
end

Instance Method Details

#listObject



112
113
114
115
116
117
118
119
120
# File 'lib/LRH.rb', line 112

def list
    @basic_lister.list do |basic_list_element|
        joined = @joiner.join(basic_list_element)
            
        joined.list do |sublist_element|
            yield sublist_element
        end
    end
end