Skip to content

Instantly share code, notes, and snippets.

@d4rky-pl
Created March 12, 2016 07:32
Show Gist options
  • Save d4rky-pl/a171b36c6bcfbbb55de4 to your computer and use it in GitHub Desktop.
Save d4rky-pl/a171b36c6bcfbbb55de4 to your computer and use it in GitHub Desktop.
Actual code found in legacy project
def self.extend_printouts_constants
const = 'PRINTOUT_PROCESS_STATES'
if ProductPrintingSupport.const_defined?(const)
old = ProductPrintingSupport.const_get(const)
ProductPrintingSupport.send(:remove_const, const)
ProductPrintingSupport.const_set(const, old + [:job_ganging_printout_in_progress])
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment