lib/csl/info.rb in csl-1.0.0.pre4 vs lib/csl/info.rb in csl-1.0.0.pre5

- old
+ new

@@ -137,12 +137,20 @@ # @return [Symbol] the parent style's citation format def citation_format return unless has_categories? + cat = categories.detect { |c| c.attribute? :'citation-format' } + return if cat.nil? + + cat[:'citation-format'].to_sym end - def ciation_format=(new_format) + def citation_format=(new_format) + cat = categories.detect { |c| c.attribute? :'citation-format' } + cat = add_child Info::Category.new if cat.nil? + + cat[:'citation-format'] = new_format.to_s end # # Info Child Nodes # \ No newline at end of file