lib/citeproc/attributes.rb in citeproc-1.0.3 vs lib/citeproc/attributes.rb in citeproc-1.0.4

- old
+ new

@@ -24,10 +24,16 @@ attributes[filter_key(key)] = filter_value(value, key) end alias []= write_attribute def attribute?(key) - value = read_attribute key + # this method is used only for conditional type access. + # When included on an object with read observations, don't count this as an observable read + if respond_to? :unobservable_read_attribute + value = unobservable_read_attribute key + else + value = read_attribute key + end return false if value.nil? return false if value.respond_to?(:empty?) && value.empty? value.to_s !~ /^(false|no|never)$/i