class CSL::Style::Date
Attributes
formatting[RW]
Public Class Methods
new(attributes = {}) { |self| ... }
click to toggle source
Calls superclass method
CSL::Node::new
# File lib/csl/style/date.rb, line 17 def initialize(attributes = {}) super(attributes, &nil) children[:'date-part'] = [] yield self if block_given? end
Public Instance Methods
date_parts_filter()
click to toggle source
@return [Array<String>] the localized date parts to be used
# File lib/csl/style/date.rb, line 25 def date_parts_filter attributes[:'date-parts'].to_s.split(/-/) end
Also aliased as: parts_filter
delimiter()
click to toggle source
# File lib/csl/style/date.rb, line 30 def delimiter attributes.fetch(:delimiter, '') end
form()
click to toggle source
# File lib/csl/style/date.rb, line 47 def form attributes[:form].to_s end
has_date_parts?()
click to toggle source
# File lib/csl/style/date.rb, line 59 def has_date_parts? !date_parts.empty? end
Also aliased as: has_parts?
has_form?()
click to toggle source
# File lib/csl/style/date.rb, line 42 def has_form? attribute?(:form) end
Also aliased as: localized?
has_overrides?()
click to toggle source
# File lib/csl/style/date.rb, line 64 def has_overrides? localized? && has_parts? end
has_variable?()
click to toggle source
# File lib/csl/style/date.rb, line 34 def has_variable? attribute?(:variable) end
numeric?()
click to toggle source
# File lib/csl/style/date.rb, line 51 def numeric? form =~ /^numeric$/i end
text?()
click to toggle source
# File lib/csl/style/date.rb, line 55 def text? form =~ /^text$/i end
variable()
click to toggle source
# File lib/csl/style/date.rb, line 38 def variable attributes[:variable] end