ika 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ika/version.rb +1 -1
  3. data/lib/ika.rb +13 -0
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 29265221e5e9356fbfb04905b0ccc23724d5c46a
4
- data.tar.gz: f552807dbf09fbd8356d6ae19952a9144d8747df
3
+ metadata.gz: c20b54f645dec7f306ffc55d903b5231e4c5be17
4
+ data.tar.gz: c618fa37275b3caba80c490148aed996e5d74e6d
5
5
  SHA512:
6
- metadata.gz: 4972443fb8b67f17e209d9f58bfbf4cf63ea8cb24ac5acecc07b719e50b00d58b318c89c89e57fe1654a92d5b7c8e8e13eb386776a00fa840a4b6678df00ba2e
7
- data.tar.gz: dcc7379327bf5046c0b59d6d88d79385da7d5317006cb71284c20d322506a220ba1cf3d1ffdd11c30207065939858aa47af7d9b8cc37fa41a3baa8ceffc3f5db
6
+ metadata.gz: 5d3b9ba0cb89faeb160b9654774f752b35a01543cda3e980d5748eccc4160ee3edecf50708d9a23edfd1a7b3e108fabe3781885181d5806fd212c9be119e1836
7
+ data.tar.gz: a1cc5b1afa85d486542ee19da75d4e1c9e8c2549795da98b4e0632b77fbbc803e1cdcf36edc22094057c27d46e4cb153b76e4d920d7d0a3ab6db8264ccf1cc03
data/lib/ika/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ika
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/ika.rb CHANGED
@@ -1,2 +1,15 @@
1
1
  module Ika
2
+ extend ActiveSupport::Concern
3
+
4
+ def export(options = self.class.reflections.keys)
5
+ to_json(include: options)
6
+ end
7
+
8
+ module ClassMethods
9
+ def export(options = reflections.keys)
10
+ includes(options).to_json(include: options)
11
+ end
12
+ end
2
13
  end
14
+
15
+ ActiveRecord::Base.send(:include, Ika)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ika
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Makoto NAKAYA