Method: Mushy::Pdf#adjust

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

#adjust(input) ⇒ Object



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

def adjust input

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

  options = {
      path: the_config[:path],
  }

  options[:landscape] = true if the_config[:landscape].to_s == 'true'

  the_browser.pdf options

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

end