Sha256: c5d820b8a5ec39f4a66d3c460e042e5b33581720a4f806c600d2335a4a7bfebc

Contents?: true

Size: 271 Bytes

Versions: 5

Compression:

Stored size: 271 Bytes

Contents

# Test for variable assignment from an if statement
@products = if params[:category]
Category.find(params[:category]).products
else
Product.all
end

# Test for variable assignment from a block
response = begin
if true?
api_call(test)
else
rejected
end
rescue
'FALSE'
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ruby-beautify-0.97.4 spec/usage_scenarios/from_control.rb
ruby-beautify-0.97.3 spec/usage_scenarios/from_control.rb
ruby-beautify-0.97.2 spec/usage_scenarios/from_control.rb
ruby-beautify-0.97.1 spec/usage_scenarios/from_control.rb
ruby-beautify-0.97.0 spec/usage_scenarios/from_control.rb