Class: Quadtone::Tools::Characterize
- Inherits:
-
Quadtone::Tool
- Object
- Quadtone::Tool
- Quadtone::Tools::Characterize
- Defined in:
- lib/quadtone/tools/characterize.rb
Instance Attribute Summary collapse
-
#channel ⇒ Object
Returns the value of attribute channel.
-
#force ⇒ Object
Returns the value of attribute force.
-
#remeasure ⇒ Object
Returns the value of attribute remeasure.
Attributes inherited from Quadtone::Tool
Instance Method Summary collapse
Methods inherited from Quadtone::Tool
#load_profile, #parse_global_option, process_args, #process_environment
Instance Attribute Details
#channel ⇒ Object
Returns the value of attribute channel.
9 10 11 |
# File 'lib/quadtone/tools/characterize.rb', line 9 def channel @channel end |
#force ⇒ Object
Returns the value of attribute force.
7 8 9 |
# File 'lib/quadtone/tools/characterize.rb', line 7 def force @force end |
#remeasure ⇒ Object
Returns the value of attribute remeasure.
8 9 10 |
# File 'lib/quadtone/tools/characterize.rb', line 8 def remeasure @remeasure end |
Instance Method Details
#parse_option(option, args) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/quadtone/tools/characterize.rb', line 11 def parse_option(option, args) case option when '--force' @force = true when '--remeasure' @remeasure = args.shift.to_i when '--channel' @channels = args.shift.split(',').map(&:to_sym) end end |
#run(*args) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/quadtone/tools/characterize.rb', line 22 def run(*args) case (action = args.shift) when 'build' @profile.characterization_curveset.build_target when 'print' @profile.characterization_curveset.print_target when 'measure' @profile.characterization_curveset.measure_target(force: @force, remeasure: @remeasure, channels: @channels) when 'process' @profile.characterization_curveset.process_target when 'chart' @profile.characterization_curveset.chart_target else raise ToolUsageError, "Unknown action: #{action.inspect}" end end |