Class: TokyoApi::Base
- Inherits:
-
Vertebrae::Model
- Object
- Vertebrae::Model
- TokyoApi::Base
show all
- Defined in:
- lib/tokyo_api/base.rb
Instance Method Summary
collapse
Instance Method Details
#normalized_base_path ⇒ Object
5
6
7
|
# File 'lib/tokyo_api/base.rb', line 5
def normalized_base_path
"#{base_path}/"
end
|
#required_fields_param(required_fields) ⇒ Object
13
14
15
16
17
18
19
|
# File 'lib/tokyo_api/base.rb', line 13
def required_fields_param(required_fields)
if required_fields.present?
"required_fields=#{required_fields.collect { |v| url_escape(v.to_s) }.join(',')}"
else
''
end
end
|
#url_escape(string) ⇒ Object
9
10
11
|
# File 'lib/tokyo_api/base.rb', line 9
def url_escape(string)
CGI.escape(string.to_s)
end
|