class Quadtone::Tools::Chart

Attributes

open[RW]
quick_look[RW]

Public Instance Methods

parse_option(option, args) click to toggle source
# File lib/quadtone/tools/chart.rb, line 10
def parse_option(option, args)
  case option
  when '--open'
    @open = true
  when '--quicklook'
    @quicklook = true
  end
end
run() click to toggle source
# File lib/quadtone/tools/chart.rb, line 19
def run
  html_path = @profile.html_path
  html_path.open('w') { |io| io.write(profile.to_html) }
  ;;warn "Saved HTML to #{html_path}"
  system 'open', html_path if @open
  system 'qlmanage', '-p', html_path if @quick_look
end