Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/fedora/base.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#to_fedora_query ⇒ Object
=> ‘test’, :num => 5.to_query # => ‘q=test&num=5’ let’s avoid stomping on rails’ version eh?.
Class Method Details
.from_xml(xml) ⇒ Object
10 11 12 |
# File 'lib/fedora/base.rb', line 10 def self.from_xml(xml) XmlSimple.xml_in(xml, 'ForceArray' => false) end |
Instance Method Details
#to_fedora_query ⇒ Object
=> ‘test’, :num => 5.to_query # => ‘q=test&num=5’
let's avoid stomping on rails' version eh?
6 7 8 |
# File 'lib/fedora/base.rb', line 6 def to_fedora_query self.collect { |key, value| "#{CGI.escape(key.to_s)}=#{CGI.escape(value.to_s)}" }.sort * '&' end |