Sha256: 863120c0ec6280aa6f5aa9b84975d0c411cbddb19b1c5508cfebfc3c566682d0

Contents?: true

Size: 306 Bytes

Versions: 1

Compression:

Stored size: 306 Bytes

Contents

# frozen_string_literal: true

# encoding=utf-8

require 'shellwords'

public

# skip :reek:UtilityFunction
def value_for_cli(value)
  case value.class.to_s
  when 'String'
    Shellwords.escape value
  when 'FalseClass', 'TrueClass'
    value ? '1' : '0'
  else
    Shellwords.escape value.to_s
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
markdown_exec-1.2.0 lib/shared.rb