lib/csl/style/sort.rb in csl-1.1.0 vs lib/csl/style/sort.rb in csl-1.2.0
- old
+ new
@@ -1,34 +1,35 @@
module CSL
class Style
class Sort < Node
- attr_children :key
+ #attr_children :key
+ #alias_child :sort_keys, :key
- alias keys key
-
def initialize(attributes = {})
super(attributes)
- children[:key] = []
-
yield self if block_given?
end
+ alias sort_keys children
+ alias sort_keys? has_children?
+ alias has_sort_keys? has_children?
+
class Key < Node
attr_struct :variable, :macro, :sort,
- :'names-use-min', :'names-use-first', :'names-use-last'
+ :'names-min', :'names-use-first', :'names-use-last'
attr_defaults :sort => 'ascending'
has_no_children
def name_options
options = {}
- options[:'et-al-use-min'] = options[:'et-al-subsequent-use-min'] =
- attributes[:'names-use-min'] if attribute? :'names-use-min'
+ options[:'et-al-min'] = options[:'et-al-subsequent-min'] =
+ attributes[:'names-min'] if attribute? :'names-min'
options[:'et-al-use-first'] = options[:'et-al-subsequent-use-first'] =
attributes[:'names-use-first'] if attribute? :'names-use-first'
options[:'et-al-use-last'] = options[:'et-al-subsequent-use-last'] =