lib/csl/schema.rb in csl-1.0.0.pre16 vs lib/csl/schema.rb in csl-1.0.0.pre17
- old
+ new
@@ -89,11 +89,19 @@
@attributes[:formatting] = [:'text-case'].concat(
@attributes.values_at(:affixes, :font).flatten)
@attributes.freeze
+
+ @values = Hash.new { |h,k| h.fetch(k.to_sym, nil) }.merge({
+ :date_part => {
+ :form => %w{ numeric numeric-leading-zeros ordinal long short }
+ }
+ })
+ @values.freeze
+
@file = File.expand_path('../../../vendor/schema/csl.rng', __FILE__)
@validators = {
:nokogiri => lambda { |schema, style|
schema.validate(Nokogiri::XML(style)).map { |e| [e.line, e.message] }
@@ -118,10 +126,10 @@
end
class << self
attr_accessor :version, :namespace, :types, :variables, :categories,
- :attributes, :preamble
+ :attributes, :preamble, :values
private :new
def attr(*arguments)
attributes.values_at(*arguments).flatten(1)
\ No newline at end of file