Module: Gridspace::Util
- Included in:
- Capability
- Defined in:
- lib/gridspace/capability.rb
Defined Under Namespace
Classes: Capability
Instance Method Summary collapse
Instance Method Details
#get_string(obj) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/gridspace/capability.rb', line 9 def get_string(obj) if obj.respond_to?(:strftime) obj.strftime('%Y-%m-%d') else obj.to_s end end |
#url_encode(hash) ⇒ Object
5 6 7 |
# File 'lib/gridspace/capability.rb', line 5 def url_encode(hash) hash.to_a.map {|p| p.map {|e| CGI.escape get_string(e)}.join '='}.join '&' end |