Method: TinyClient::Resource#as_json
- Defined in:
- lib/tiny_client/resource.rb
#as_json(options = {}) ⇒ Hash Also known as: to_h
219 220 221 222 223 |
# File 'lib/tiny_client/resource.rb', line 219 def as_json( = {}) self.class.fields.each_with_object({}) do |field, h| h[field] = send(field) end.as_json() end |