Class: CSL::Style::Text
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?, #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
#nesting
#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
#has_macro? ⇒ Boolean
22
23
24
|
# File 'lib/csl/style/text.rb', line 22
def has_macro?
attribute?(:macro)
end
|
#has_term? ⇒ Boolean
34
35
36
|
# File 'lib/csl/style/text.rb', line 34
def has_term?
attribute?(:term)
end
|
#has_value? ⇒ Boolean
38
39
40
|
# File 'lib/csl/style/text.rb', line 38
def has_value?
attribute?(:value)
end
|
#has_variable? ⇒ Boolean
10
11
12
|
# File 'lib/csl/style/text.rb', line 10
def has_variable?
attribute?(:variable)
end
|
27
28
29
30
31
32
|
# File 'lib/csl/style/text.rb', line 27
def macro
raise "failed to resolve macro #{attributes[:macro].inspect}" unless
!root? && root.respond_to?(:macros)
root.macros[attributes[:macro]]
end
|
42
43
44
|
# File 'lib/csl/style/text.rb', line 42
def value
attributes[:value]
end
|
14
15
16
|
# File 'lib/csl/style/text.rb', line 14
def variable
attributes[:variable]
end
|
#variable_options ⇒ Object
18
19
20
|
# File 'lib/csl/style/text.rb', line 18
def variable_options
attributes_for :form
end
|