class Quadtone::Tools::PrinterOptions
Attributes
printer[RW]
show_attributes[RW]
Public Instance Methods
load_profile()
click to toggle source
# File lib/quadtone/tools/printer_options.rb, line 10 def load_profile false end
parse_option(option, args)
click to toggle source
# File lib/quadtone/tools/printer_options.rb, line 14 def parse_option(option, args) case option when '--printer' @printer = Printer.new(args.shift) when '--show-attributes' @show_attributes = true end end
run(*args)
click to toggle source
# File lib/quadtone/tools/printer_options.rb, line 23 def run(*args) if @printer printer = @printer elsif @profile printer = @profile.printer else raise ToolUsageError, "Must specify either printer or profile" end printer.show_attributes if @show_attributes printer.show_options printer.show_inks end