cerulean 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cerulean.rb +3 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1944b550614f207eb5f8ae51f118da6dd268d9af
4
- data.tar.gz: d0162f5966a701325706a99a978093a44c967e39
3
+ metadata.gz: 0e59127223d322340bed7b946c251e91d6ff40f5
4
+ data.tar.gz: 2afc6f7147fb46f37c4655acf2880008999292ea
5
5
  SHA512:
6
- metadata.gz: 7635c9bd4dbd13898756c1c255b229d8d9e3a79385d88ff83bd5271d30e56fa78f5461af2819540fed7fd5b960e5f4e4cdda11cc31c9f126e1daa7f9d6e09f14
7
- data.tar.gz: 041284b123780b9b2c7c699beab8de9a1f68f909cc2af00d47e0ca66e33a1d524e5f76bbc2679de929a1c5fab0933226f6946dce9126da08c2a3a2f18510103f
6
+ metadata.gz: 552bb530592c91527815d4e82ffa12cac3b7f6414ca22eadb3e6c0d86e171b2fed1ab965e9b77a1e1c8b5bd2af391e3c7cd8194a1db51b09cdd3595c5d8f0288
7
+ data.tar.gz: 59d14a6d765f795c7e26c8e9790654c7124b4516b8cd3a2e5203fa8ed9d103d3e524f61083d9beb7379977449343afed8799a622a319f09d847ad1880b0eae96
data/lib/cerulean.rb CHANGED
@@ -60,11 +60,11 @@ module Cerulean
60
60
  @declared ||= {} #Hashie::Mash.new(params)
61
61
  end
62
62
 
63
- def present(object)
63
+ def present(object, opts={})
64
64
  if object.is_a?(Array) || object.is_a?(ActiveRecord::Relation)
65
- render json: object.map { |el| meta[:presenter].new(el).as_json }
65
+ render json: object.map { |el| meta[:presenter].new(el).as_json(**opts) }
66
66
  else
67
- render json: meta[:presenter].new(object).as_json
67
+ render json: meta[:presenter].new(object).as_json(**opts)
68
68
  end
69
69
  end
70
70
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cerulean
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Kestell