class CSL::Style::Number
Numbers are CSL
rendering elements which output the number variable selected with the required variable attribute.
Attributes
Public Instance Methods
Source
# File lib/csl/style/number.rb, line 11 def has_variable? attribute?(:variable) end
Source
# File lib/csl/style/number.rb, line 40 def long_ordinal? has_form? && form == 'long-ordinal' end
@return [Boolean] whether or not the number’s format is set to ‘long-ordinal’
Source
# File lib/csl/style/number.rb, line 30 def numeric? !has_form? || form == 'numeric' end
@return [Boolean] whether or not the number’s format is set to
:numeric; also returns true if the number's form attribute is not set or nil.
Source
# File lib/csl/style/number.rb, line 35 def ordinal? has_form? && form == 'ordinal' end
@return [Boolean] whether or not the number’s format is set to ‘ordinal
Source
# File lib/csl/style/number.rb, line 45 def roman? has_form? && form == 'roman' end
@return [Boolean] whether or not the number’s format is set to ‘roman’