ViewComposer 0.1.0 → 0.1.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 336035687d6fa286eec62a0435eda547764ee858
4
- data.tar.gz: 9e6a4ee0f9c9962fccc6109eade59ef5017870ef
3
+ metadata.gz: e01710912069f547c2f251e819955b4dfdf76c2c
4
+ data.tar.gz: 15315b3fcdc08e1cd8ef1f43afd23f35f9adce13
5
5
  SHA512:
6
- metadata.gz: 24a3bb451d252802e4851cc673332c60ac67576a35b7857624a10347f5aa67a505c31f5f8ffd889c5e81a7ba8f626e093c7e2e7e9fcc8046bd4f2654cd00bba4
7
- data.tar.gz: e99e8f56e587c443744063d04753dd9f536feae1f78c63ee7ee34fec1a46a98d42c2342573cfe406113e717360f31c7a0154d130cf1c6516b7f2035832ce2039
6
+ metadata.gz: de0ded3689cf1873e8c08dff447c262f94645720cf7bae67d1090a920d1be3445eec8259cda3f22f0e2e5e49d9352648e848bc25b6171b77d4f8392c6c748771
7
+ data.tar.gz: 2fbf89468409977c0f009eb7c0e3fa3719c04a23d867dd568bca11ca613e0674102eb1bcbac02fbc01e26e58addbf7288945431a345d2f074a2386f886b1692d
@@ -8,7 +8,10 @@ class BaseComposer
8
8
  def initialize(model:, composable_objects: [] )
9
9
  @model = model
10
10
  @json_hash = {}
11
+
12
+ @parent_methods = self.class.superclass.instance_methods(false)
11
13
  @composer_methods = self.class.instance_methods(false)
14
+ @dont_redefine = @parent_methods + @composer_methods
12
15
  @_attrs = self.class._attributes
13
16
  set_attributes
14
17
  setup_comp_objs(composable_objects)
@@ -42,7 +45,8 @@ private
42
45
  end
43
46
 
44
47
  def set_attributes
45
- defineable_methods = @_attrs - @composer_methods
48
+ defineable_methods = @_attrs - @dont_redefine
49
+ #puts "#{self}: #{defineable_methods}"
46
50
  define_methods(defineable_methods, @model)
47
51
  end
48
52
 
@@ -57,6 +61,7 @@ private
57
61
  def define_methods(method_names, method_owner)
58
62
  method_names.each do |attr|
59
63
  self.class.send(:define_method, attr) do
64
+ #puts method_owner.send(attr)
60
65
  method_owner.send(attr)
61
66
  end
62
67
  end
@@ -1,3 +1,3 @@
1
1
  module ViewComposer
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ViewComposer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kory Tegman