Class: Mushy::Pdf
Instance Attribute Summary
Attributes inherited from Flux
#config, #id, #masher, #parent_fluxs, #subscribed_to, #type
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Browser
#get_the_cookies_from, #get_the_headers_from, #process
Methods inherited from Flux
#convert_this_to_an_array, #convert_to_symbolized_hash, #execute, #execute_single_event, #group_these_results, #guard, inherited, #initialize, #join_these_results, #limit_these_results, #merge_these_results, #model_these_results, #outgoing_split_these_results, #process, #shape_these, #sort_these_results, #standardize_these
Constructor Details
This class inherits a constructor from Mushy::Flux
Class Method Details
.details ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/mushy/fluxs/pdf.rb', line 5 def self.details details = Browser.details details['name'] = 'Pdf' details['description'] = 'Turn a URL into a PDF.' details[:config][:path] = { description: 'The path of the PDF file to save.', type: 'text', value: 'picture.pdf', } details[:config][:landscape] = { description: 'Build the PDF in landscape. Defaults to false.', type: 'boolean', shrink: true, value: '', } details end |
Instance Method Details
#adjust(input) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/mushy/fluxs/pdf.rb', line 26 def adjust input the_browser = input[:browser] the_result = input[:result] the_config = input[:config] = { path: the_config[:path], } [:landscape] = true if the_config[:landscape].to_s == 'true' the_browser.pdf end |