repositor 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repositor.rb +4 -16
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb466175011fee954d7b720f735ef1b6ff210a6a
4
- data.tar.gz: 150ea655a58826c8b4eb71d63f00c3ff4bf35abc
3
+ metadata.gz: 65d71997b02ae761d511e1f4db0f6a449a2f713d
4
+ data.tar.gz: c64f9c99f14ad37fe7c5cad280330962fb363d36
5
5
  SHA512:
6
- metadata.gz: 4525fa43b2e4a34528b57a792ef219e7b085d57e35bd37aaf02a8abfa607bbe8b90beee8cd32a9827c968aeaace8fe203635bbc788524608318d87740e3ac3b9
7
- data.tar.gz: 8644c57145638ab3aaa74ef3b8d84e9b673161995bcc7bd00b707ad193845ef2edecd10ba4b6442746359b6c10b96e04b16da110c249fabb5475bb1ca9781196
6
+ metadata.gz: 72404871ad289195e50595cef7bf212f603e56f1d60aa6204463e672b818bb65fe6b6f98ff2862271ead2c2ae5f07d1794006415ee9f5cbdbe220c86d688463a
7
+ data.tar.gz: a7565abba77e46f8711b711fc37bafcf4b2a06a61a5d66d710769067ed617e05933368cfc306b0f4cc48edf0375fd85159b6797fa521a1597bfdcafab7d28be9
data/lib/repositor.rb CHANGED
@@ -1,21 +1,9 @@
1
1
  module Repositor
2
- attr_reader :model
2
+ attr_reader :model, :orm
3
3
 
4
- class << self
5
- attr_reader :model, :orm
6
-
7
- def build(model: nil, orm: :active_record)
8
- @model = model || self.class.to_s.chomp("Repo").singularize.constantize
9
- @orm = orm || :active_record
10
- end
11
- end
12
-
13
- attr_reader :config, :model, :orm
14
-
15
- def initialize
16
- @config = {}
17
- @model = self.class.model
18
- @orm = self.class.orm
4
+ def initialize(model: nil, orm: :active_record)
5
+ @model = model || self.class.to_s.chomp("Repo").singularize.constantize
6
+ @orm = orm || :active_record
19
7
  end
20
8
 
21
9
  def find(record_id)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: repositor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Volodya Sveredyuk