instance method
force_array?
Ruby on Rails 2.2.3
Since v2.2.3 Last seen in v2.2.3 PrivateSignature
force_array?(key)
Checks, if the ‘forcearray’ option has to be used for a certain key.
Parameters
-
keyreq
Source
# File activesupport/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb, line 689
def force_array?(key)
return false if key == @options['contentkey']
return true if @options['forcearray'] == true
forcearray = @options['forcearray']
if forcearray.instance_of?(Hash)
return true if forcearray.has_key?(key)
return false unless forcearray.has_key?('_regex')
forcearray['_regex'].each { |x| return true if key =~ x }
end
return false
end
Defined in activesupport/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb line 689
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in XmlSimple