Class: CSL::Sort

Inherits:
Node show all
Defined in:
lib/csl/style/sort.rb

Defined Under Namespace

Classes: Key

Instance Attribute Summary

Attributes inherited from Node

#attributes

Attributes included from Treelike

#children, #nodename, #parent

Instance Method Summary collapse

Methods inherited from Node

#<=>, #attribute?, #attributes?, #attributes_for, constantize, create, create_attributes, #custom_attributes, #deep_copy, #default_attribute?, default_attributes, #default_attributes, #each, #exact_match?, #formatting_options, #has_attributes?, #has_default_attributes?, #has_language?, hide_default_attributes!, hide_default_attributes?, #initialize_copy, #inspect, #match?, match?, matches?, parse, parse!, #save_to, show_default_attributes!, #tags, #textnode?, types

Methods included from PrettyPrinter

#pretty_print, #tags, #to_xml

Methods included from Treelike

#<<, #add_child, #add_children, #ancestors, #delete_child, #delete_children, #depth, #descendants, #each_ancestor, #each_child, #each_descendant, #each_sibling, #empty?, #find_child, #find_children, #has_children?, #root, #root?, #siblings, #unlink

Constructor Details

#initialize(attributes = {}) {|_self| ... } ⇒ Sort

Returns a new instance of Sort.

Yields:

  • (_self)

Yield Parameters:

  • _self (CSL::Sort)

    the object that the method was called on



9
10
11
12
13
14
# File 'lib/csl/style/sort.rb', line 9

def initialize(attributes = {})
  super(attributes)
  children[:key] = []
  
  yield self if block_given?
end