I am trying to build a hash from conditional statements

```
def create_hash(opt ={})

hash = {:a => if opt[:a] ? a : 0.40; end},
        :b => if opt[:b] ? b : 0.30; end,
        :c => if opt[:c] ? c : 0.05; end}
end

create_hash :a => 0.30 
#hash = {:a => 0.30, :b => 0.30, :c => 0.05}

```

i have tried using tap, but it seems like it will only give back one value if a condition is met instead of returning an else value - [Building a hash in a conditional way](https://stackoverflow.com/questions/7328647/building-a-hash-in-a-conditional-way). is there a good way to create conditional hashes like this?