Class: CSL::Style::Bibliography

Inherits:
Node show all
Includes:
InheritableNameOptions
Defined in:
lib/csl/style/bibliography.rb

Instance Attribute Summary

Attributes inherited from Node

#attributes

Attributes included from Treelike

#children, #nodename, #parent

Instance Method Summary collapse

Methods included from InheritableNameOptions

#inheritable_name_options, #inheritable_names_options

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?, #format_page_ranges?, #formatting_options, #has_attributes?, #has_default_attributes?, #has_language?, hide_default_attributes!, hide_default_attributes?, #initialize, #initialize_copy, #inspect, match?, #match?, matches?, #merge!, #page_range_format, parse, parse!, #quotes?, #reverse_merge!, #save_to, show_default_attributes!, #strip_periods?, #tags, #textnode?, types

Methods included from Extensions::Nesting

#nesting

Methods included from PrettyPrinter

#pretty_print, #tags, #to_xml

Methods included from Treelike

#<<, #add_child, #add_children, #ancestors, #closest, #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

This class inherits a constructor from CSL::Node

Instance Method Details

#bibliography_optionsObject



19
20
21
# File 'lib/csl/style/bibliography.rb', line 19

def bibliography_options
  attributes_for(*Schema.attr(:bibliography))
end

#sort_keysObject



23
24
25
26
# File 'lib/csl/style/bibliography.rb', line 23

def sort_keys
  return [] unless sort?
  children[:sort].sort_keys
end

#subsequent_author_substituteObject



32
33
34
# File 'lib/csl/style/bibliography.rb', line 32

def subsequent_author_substitute
  attributes[:'subsequent-author-substitute'].to_s
end

#subsequent_author_substitute_ruleObject



36
37
38
# File 'lib/csl/style/bibliography.rb', line 36

def subsequent_author_substitute_rule
  attributes[:'subsequent-author-substitute-rule'].to_s
end

#substitute_subsequent_authors?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/csl/style/bibliography.rb', line 28

def substitute_subsequent_authors?
  attribute?(:'subsequent-author-substitute')
end

#substitute_subsequent_authors_completely?Boolean

Returns:

  • (Boolean)


40
41
42
43
# File 'lib/csl/style/bibliography.rb', line 40

def substitute_subsequent_authors_completely?
  return false unless substitute_subsequent_authors?
  subsequent_author_substitute_rule == 'complete-all'
end

#substitute_subsequent_authors_individually?Boolean

Returns:

  • (Boolean)


45
46
47
48
# File 'lib/csl/style/bibliography.rb', line 45

def substitute_subsequent_authors_individually?
  return false unless substitute_subsequent_authors?
  subsequent_author_substitute_rule != 'complete-all'
end