Class: CSL::Info::Published
Instance Attribute Summary
Attributes inherited from TextNode
Attributes inherited from Node
Attributes included from Treelike
Instance Method Summary collapse
- #to_time ⇒ Object (also: #to_date)
Methods inherited from TextNode
create, #empty?, #initialize, #inspect, #tags, #textnode?, #to_s
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
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
This class inherits a constructor from CSL::TextNode
Instance Method Details
#to_time ⇒ Object Also known as: to_date
273 274 275 276 |
# File 'lib/csl/info.rb', line 273 def to_time return if empty? Time.parse(to_s) end |