<code> param = if object.property then object.property else default_param end </code>
Though, actually if you want to do what the description says (use the default if the property is unassigned, represented conventionally in Ruby by the accessor returning nil) rather than what either the good or bad code does, you probably want:
<code> param = if not object.property.nil? then object.property else default_param end </code>
(The difference between this and the other versions shows up if the property is assigned, and its value is false.)