Class: MultiLister
Instance Method Summary collapse
-
#initialize(main_lister, joiner) ⇒ MultiLister
constructor
A new instance of MultiLister.
- #list ⇒ Object
Methods inherited from Lister
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
#list ⇒ Object
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 |