Class: ParamsService
- Inherits:
-
Object
- Object
- ParamsService
- Defined in:
- lib/twitter_labs_api/services/params_service.rb
Class Method Summary collapse
-
.from_fields(fields) ⇒ Hash
Convert user-passed fields hash to query params.
Class Method Details
.from_fields(fields) ⇒ Hash
Convert user-passed fields hash to query params
8 9 10 11 12 13 14 |
# File 'lib/twitter_labs_api/services/params_service.rb', line 8 def self.from_fields(fields) fields.keys.inject({}) do |memo, key| memo["#{key}.fields"] = fields[key].join(',') memo end end |