mozaic 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/mozaic/component.rb +4 -5
- data/lib/mozaic/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d38922ee69ba145ae864f2cfaac1325f92e08b14167aca5a7183a30c6a88ad7
|
4
|
+
data.tar.gz: 388f87704b3a90464688ead0127d006041d26f075503a55e0a7c31d4c0027c7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71020fcbcffcf80d87deb7769c1d8a5dc05e11d1eb505a6477c7eaedbda8fd98b84de7b29caca2e2223824c6ca9705f3d4bcf668ced5f8517d20dd520b1de189
|
7
|
+
data.tar.gz: 451fd73565a2af10009e2fe50d83a0e5dc05c0683f64dd7724d248176b7731777be426b38a4213d2cf867a903d79146753ab65343dab584794935e85d43c6997
|
data/CHANGELOG.md
CHANGED
data/lib/mozaic/component.rb
CHANGED
@@ -4,23 +4,22 @@ module Mozaic
|
|
4
4
|
cattr_accessor :instances
|
5
5
|
attr_accessor :name
|
6
6
|
attr_accessor :block
|
7
|
-
|
7
|
+
attr_accessor :defaults
|
8
8
|
|
9
9
|
def initialize name, options = {}, &block
|
10
10
|
self.name = name.to_sym
|
11
11
|
self.block = block if block_given?
|
12
|
-
self.
|
12
|
+
self.defaults = options
|
13
13
|
self.class.instances = [] if @@instances.nil?
|
14
14
|
self.class.instances << self
|
15
15
|
end
|
16
16
|
|
17
17
|
def options options = {}
|
18
|
-
@
|
18
|
+
@defaults.merge options
|
19
19
|
end
|
20
20
|
|
21
21
|
def render options = {}
|
22
|
-
self.options
|
23
|
-
self.block.call(self.options) unless self.block.nil?
|
22
|
+
self.block.call(self.options(options)) unless self.block.nil?
|
24
23
|
end
|
25
24
|
|
26
25
|
def self.find_by_name name
|
data/lib/mozaic/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mozaic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Hübotter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|