Sha256: 9a19a65f64c75470001249deb60a21c617fe16f0aa6806282adc1c8b988bc062
Contents?: true
Size: 395 Bytes
Versions: 2
Compression:
Stored size: 395 Bytes
Contents
# frozen_string_literal: true module Pcli module Services class Qr include Depends.on('cmd', 'output', 'which') def show(content) if which.exist?('qr') out, err = cmd.new(pty: true, printer: :null).run(" qr '#{content}'") output.puts out else output.puts RQRCode::QRCode.new(code).as_ansi end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pcli-0.1.1 | lib/pcli/services/qr.rb |
pcli-0.1.0 | lib/pcli/services/qr.rb |