Method: MARCSpec::ConstantSolrSpec#initialize
- Defined in:
- lib/marcspec/constantspec.rb
#initialize(opts = {}) ⇒ ConstantSolrSpec
Returns a new instance of ConstantSolrSpec.
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/marcspec/constantspec.rb', line 11 def initialize opts = {} @solrField = opts[:solrField] @constantValue = opts[:constantValue] @arity = 1 # Check to make sure we didn't get anything else and warn if need be [:firstOnly, :mapname, :noMapKeyDefault, :specs, :default, :module, :functionSymbol].each do |s| if opts[s] raise ArgumentError, "#{s} is not a valid option for Constant spec (one with :constantValue defined)" end end end |