lib/screen-recorder/window.rb
#
# Returns a list of available window titles for the given process (application) name.
#
# @return [Array]
#
# @example
#   ScreenRecorder::Window.fetch_title('chrome')
#   #=> ["New Tab - Google Chrome"]
Returns a list of available window titles for the given process (application) name.
Returns a list of available window titles for the given process ( application ) name .
def warn_on_mismatch(titles, process_name)
        return if titles.map(&:downcase).join(',').include? process_name.to_s
        ScreenRecorder.logger.warn "Process name and window title(s) do not match: #{titles}"
        ScreenRecorder.logger.warn 'Please manually provide the displayed window title.'
      end
def warn_on_mismatch ( titles , process_name ) return if titles . map ( & :downcase ) . join ( ',' ) . include? process_name . to_s ScreenRecorder . logger . warn "Process name and window title(s) do not match: #{titles}" ScreenRecorder . logger . warn 'Please manually provide the displayed window title.' end
Returns a list of available window titles for the given process (application) name.
Returns a list of available window titles for the given process ( application ) name .
None
Array
titles
<not_specific>
process_name
<not_specific>
example
:Window.fetch_title('chrome') #=> ["New Tab - Google Chrome"]
: Window . fetch_title ( ' chrome ' ) # = > [ " New Tab - Google Chrome " ]