Class: CSL::Style::Names
Instance Attribute Summary
Attributes inherited from Node
Attributes included from Treelike
Instance Method Summary collapse
- #delimiter ⇒ Object
- #has_variable? ⇒ Boolean
-
#initialize(attributes = {}) {|_self| ... } ⇒ Names
constructor
A new instance of Names.
- #variable ⇒ Object
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
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| ... } ⇒ Names
Returns a new instance of Names.
12 13 14 15 16 17 |
# File 'lib/csl/style/names.rb', line 12 def initialize(attributes = {}) super(attributes) children[:label] = [] yield self if block_given? end |
Instance Method Details
#delimiter ⇒ Object
19 20 21 |
# File 'lib/csl/style/names.rb', line 19 def delimiter attributes.fetch(:delimiter, '') end |
#has_variable? ⇒ Boolean
23 24 25 |
# File 'lib/csl/style/names.rb', line 23 def has_variable? attribute?(:variable) end |
#variable ⇒ Object
27 28 29 |
# File 'lib/csl/style/names.rb', line 27 def variable attributes[:variable].to_s end |