lib/citeproc/attributes.rb in citeproc-1.0.0.pre2 vs lib/citeproc/attributes.rb in citeproc-1.0.0.pre3
- old
+ new
@@ -13,16 +13,18 @@
def_delegators :attributes, :length, :empty?, :values_at, :key?, :value?
alias size length
- def [](key)
+ def read_attribute(key)
attributes[filter_key(key)]
end
-
- def []=(key, value)
+ alias [] read_attribute
+
+ def write_attribute(key, value)
attributes[filter_key(key)] = filter_value(value)
end
+ alias []= write_attribute
def filter_key(key)
key.to_sym
end
\ No newline at end of file