citeproc 1.0.0.pre7 → 1.0.0.pre8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/citeproc.rb +1 -0
- data/lib/citeproc/variable.rb +6 -8
- data/lib/citeproc/version.rb +1 -1
- metadata +2 -2
data/lib/citeproc.rb
CHANGED
data/lib/citeproc/variable.rb
CHANGED
@@ -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
|
data/lib/citeproc/version.rb
CHANGED
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.
|
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:
|
164
|
+
hash: 3751303087540435209
|
165
165
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
166
166
|
none: false
|
167
167
|
requirements:
|