lib/clippy.rb
# --
# Pull out the binary we need to use.
# rubocop:disable Lint/LiteralInCondition
# @return [String]
# --
Pull out the binary we need to use.
Pull out the binary we need to use .
def binary
    @binary ||= begin
      if windows?
        "clip".freeze
      else
        case true
        when system("which xclip > /dev/null 2>&1")  then "xclip"
        when system("which xsel > /dev/null 2>&1")   then "xsel"
        when system("which pbcopy > /dev/null 2>&1") then "pbcopy"
        else
          raise UnknownClipboardError
        end
      end
    end
  end
def binary @binary ||= begin if windows? "clip" . freeze else case true when system ( "which xclip > /dev/null 2>&1" ) then "xclip" when system ( "which xsel > /dev/null 2>&1" ) then "xsel" when system ( "which pbcopy > /dev/null 2>&1" ) then "pbcopy" else raise UnknownClipboardError end end end end
Pull out the binary we need to use.
Pull out the binary we need to use .
None
String