Method: Mushy::Screenshot#adjust

Defined in:
lib/mushy/fluxs/screenshot.rb

#adjust(input) ⇒ Object



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# File 'lib/mushy/fluxs/screenshot.rb', line 99

def adjust input

  the_browser = input[:browser]
  the_result  = input[:result]
  the_config  = input[:config]

  file = Mushy::WriteFile.get_file_from the_config
  options = {
      path:    file,
      full:    ['true', ''].include?(the_config[:full].to_s),
      quality: (the_config[:quality].to_s == '' ? '100' : the_config[:quality]).to_i
  }

  the_browser.screenshot options

  the_result[:options] = options
  the_result[:file] = Mushy::Ls.new.process({}, { path: file })[0]

  the_result

end