Module: BusinessCentral::Object::URLHelper
- Included in:
- FilterQuery, URLBuilder
- Defined in:
- lib/business_central/object/url_helper.rb
Instance Method Summary collapse
- #encode_url_object(object) ⇒ Object
- #encode_url_params(query) ⇒ Object
- #odata_encode(value) ⇒ Object
Instance Method Details
#encode_url_object(object) ⇒ Object
8 9 10 |
# File 'lib/business_central/object/url_helper.rb', line 8 def encode_url_object(object) URI::RFC2396_Parser.new.escape(object) end |
#encode_url_params(query) ⇒ Object
12 13 14 |
# File 'lib/business_central/object/url_helper.rb', line 12 def encode_url_params(query) CGI.escape(query) end |
#odata_encode(value) ⇒ Object
16 17 18 19 20 |
# File 'lib/business_central/object/url_helper.rb', line 16 def odata_encode(value) value = value.dup value.gsub!(/'/, "''") if value.instance_of?(String) && value =~ /'/ value.to_s end |