File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -231,17 +231,18 @@ def puts line = ""
231231 end
232232
233233 def draw ( data )
234- data = data [ name ] || "No content"
234+ window_data = data [ name ]
235+ return unless window_data
235236
236- case data
237+ case window_data
237238 when String
238- puts ( data )
239+ puts ( window_data )
239240 when Array
240- data . each do |d |
241+ window_data . each do |d |
241242 puts ( d )
242243 end
243244 else
244- raise "unsupported top frame data type: #{ data . class } (#{ data } )"
245+ raise "unsupported window data type for window [ #{ name } ] : #{ data . class } (#{ data } )"
245246 end
246247 end
247248
Original file line number Diff line number Diff line change @@ -190,10 +190,9 @@ def << req
190190 def generate_tui_data ( metadata )
191191 metadata . each_with_object ( { } ) do |( tui_name , options ) , result |
192192 tui_method = "generate_tui_#{ tui_name } "
193+
193194 if respond_to? ( tui_method )
194195 result [ tui_name ] = send ( tui_method , options )
195- else
196- result [ tui_name ] = [ ]
197196 end
198197 end
199198 end
You can’t perform that action at this time.
0 commit comments