class CSL::Style::Number
Numbers are CSL
rendering elements which output the number variable selected with the required variable attribute.
Attributes
formatting[R]
Public Instance Methods
form()
click to toggle source
# File lib/csl/style/number.rb, line 23 def form attributes[:form].to_s end
has_form?()
click to toggle source
# File lib/csl/style/number.rb, line 19 def has_form? attribute?(:form) end
has_variable?()
click to toggle source
# File lib/csl/style/number.rb, line 11 def has_variable? attribute?(:variable) end
long_ordinal?()
click to toggle source
@return [Boolean] whether or not the number's format is set to 'long-ordinal'
# File lib/csl/style/number.rb, line 40 def long_ordinal? has_form? && form == 'long-ordinal' end
numeric?()
click to toggle source
@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.
# File lib/csl/style/number.rb, line 30 def numeric? !has_form? || form == 'numeric' end
ordinal?()
click to toggle source
@return [Boolean] whether or not the number's format is set to 'ordinal
# File lib/csl/style/number.rb, line 35 def ordinal? has_form? && form == 'ordinal' end
roman?()
click to toggle source
@return [Boolean] whether or not the number's format is set to 'roman'
# File lib/csl/style/number.rb, line 45 def roman? has_form? && form == 'roman' end
variable()
click to toggle source
# File lib/csl/style/number.rb, line 15 def variable attributes[:variable] end