Sha256: 069ea5379aed07b55aad986d1953892b7800fb8a6115e2d946853a29ca1add1c

Contents?: true

Size: 737 Bytes

Versions: 8

Compression:

Stored size: 737 Bytes

Contents

# Perfect spacing around ternary colon
bobo = true ? true : false

# No space after ternary colon
bobo = true ? true :false

# No space before ternary colon
bobo = true ? true: false

# No space before or after ternary colon
bobo = true ? true:false

# 2 spaces after ternary colon
bobo = true ? true :  false

# 2 spaces before ternary colon
bobo = true ? true  : false

# Skip when colon is part of a symbol or namespace operator
bobo = { :thing => ":clown" }
bobo[:thing] == :dog ? bobo[:thing] : Math::PI

# Skip when colon is part of Regexp class
bobo[:thing].scan(/[:alpha:]/)

# Skip when setting load path
$:.unshift File.dirname(__FILE__)

# Skip when question mark method is followed by a symbol
if bobo[:thing].eql? :clown
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
tailor-1.0.0.alpha2 features/support/legacy/bad_ternary_colon_spacing.rb
tailor-1.0.0.alpha features/support/legacy/bad_ternary_colon_spacing.rb
tailor-0.1.5 features/support/1_file_with_bad_ternary_colon_spacing/bad_ternary_colon_spacing.rb
tailor-0.1.4 features/support/1_file_with_bad_ternary_colon_spacing/bad_ternary_colon_spacing.rb
tailor-0.1.3 features/support/1_file_with_bad_ternary_colon_spacing/bad_ternary_colon_spacing.rb
tailor-0.1.2 features/support/1_file_with_bad_ternary_colon_spacing/bad_ternary_colon_spacing.rb
tailor-0.1.1 features/support/1_file_with_bad_ternary_colon_spacing/bad_ternary_colon_spacing.rb
tailor-0.1.0 features/support/1_file_with_bad_ternary_colon_spacing/bad_ternary_colon_spacing.rb