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?, #formatting_options, #has_attributes?, #has_default_attributes?, #has_language?, hide_default_attributes!, hide_default_attributes?, #initialize, #initialize_copy, #inspect, match?, #match?, matches?, parse, parse!, #save_to, show_default_attributes!, #tags, #textnode?, types
#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
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
32
33
34
|
# File 'lib/csl/style/text.rb', line 32
def has_term?
attribute?(:term)
end
|
#has_value? ⇒ Boolean
36
37
38
|
# File 'lib/csl/style/text.rb', line 36
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
|
# File 'lib/csl/style/text.rb', line 27
def macro
raise unless parent.respond_to?(:macros)
parent.macros[attributes[:macro]]
end
|
40
41
42
|
# File 'lib/csl/style/text.rb', line 40
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
|