lib/presenting/attribute.rb in presenting-2.0.1 vs lib/presenting/attribute.rb in presenting-2.0.2

- old
+ new

@@ -30,12 +30,15 @@ # - Proc: a custom block that accepts the record as an argument attr_accessor :value def value_from(obj) #:nodoc: case value - when Symbol: obj.is_a?(Hash) ? obj[value] : obj.send(value) - when String: value - when Proc: value.call(obj) + when Symbol + obj.is_a?(Hash) ? obj[value] : obj.send(value) + when String + value + when Proc + value.call(obj) end end # whether html should be sanitize. right now this actually means html escaping. # consider: by default, do not sanitize if value is a String?