citeproc 1.0.0.pre7 → 1.0.0.pre8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/citeproc.rb CHANGED
@@ -32,6 +32,7 @@ require 'citeproc/abbreviate'
32
32
  require 'citeproc/attributes'
33
33
 
34
34
  require 'citeproc/variable'
35
+ require 'citeproc/number'
35
36
  require 'citeproc/date'
36
37
  require 'citeproc/names'
37
38
 
@@ -176,6 +176,12 @@ module CiteProc
176
176
  end
177
177
  end
178
178
 
179
+ # @return [String, nil] roman equivalent of the variable's numeric value
180
+ def romanize
181
+ return unless numeric?
182
+ Number.romanize(to_i)
183
+ end
184
+
179
185
  # Tests whether the variable contains numeric content. Content is
180
186
  # considered numeric if it solely consists of numbers. Numbers may have
181
187
  # prefixes and suffixes ("D2", "2b", "L2d"), and may be separated by a
@@ -248,12 +254,4 @@ module CiteProc
248
254
  # A CiteProc Variable used for string values.
249
255
  class Text < Variable
250
256
  end
251
-
252
- # A CiteProc Variable used for numeric values.
253
- class Number < Variable
254
- def self.pluralize?(string)
255
- /\S\s*[,&-]\s*\S|\df/ === string
256
- end
257
- end
258
-
259
257
  end
@@ -1,3 +1,3 @@
1
1
  module CiteProc
2
- VERSION = '1.0.0.pre7'.freeze
2
+ VERSION = '1.0.0.pre8'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: citeproc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre7
4
+ version: 1.0.0.pre8
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -161,7 +161,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
161
161
  version: '0'
162
162
  segments:
163
163
  - 0
164
- hash: 3582496609882275232
164
+ hash: 3751303087540435209
165
165
  required_rubygems_version: !ruby/object:Gem::Requirement
166
166
  none: false
167
167
  requirements: