source/fee.rb
1# The fee for an order: 5 off for a member who has paid, and
2# 10 off a big order.
3def fee(user, order)
4 total = 100
if user.member? && order.paid?
if011
├─ &&FTF
│ ├─ user.member?TTF
│ └─ order.paid?FT
└─ then✓
6 total -= 5
7 end
if order.big?
if11
├─ order.big?TF
└─ then✓
9 total -= 10
10 end
11 total
12end
2/40011
5TFTF
8FTTF