express_templates 0.11.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/express_templates/components/base.rb +6 -7
- data/lib/express_templates/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77351e951a43fa098f87369232be07e4c7557a08
|
4
|
+
data.tar.gz: e58f2909cae09e642f7e3411fa047acc43f8b0d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3891a36f53ab4f754338f3d6b0ef2174fa228e2cf58b7f7afd9675df6d79f3b7365c8ab40ac492cdd183a0f729d53ec82e9831c89b407049679de949ec43f1a3
|
7
|
+
data.tar.gz: 52a0c2d8747cb396134ca8df04b7c53779d7ea5e975e740b54018b50c3e39b76aca1b889e7e62bd47f4feed5b006147f57b0caaa589be51d75a7d6aa010d0823
|
@@ -15,12 +15,15 @@ module ExpressTemplates
|
|
15
15
|
class_attribute :before_build_hooks
|
16
16
|
self.before_build_hooks = []
|
17
17
|
|
18
|
+
class_attribute :builder_method_name
|
19
|
+
|
18
20
|
def self.builder_method_and_class(method_name, klass)
|
19
21
|
Arbre::Element::BuilderMethods.class_eval <<-EOF, __FILE__, __LINE__
|
20
22
|
def #{method_name}(*args, &block)
|
21
23
|
insert_tag ::#{klass.name}, *args, &block
|
22
24
|
end
|
23
25
|
EOF
|
26
|
+
self.builder_method_name = method_name
|
24
27
|
# puts "added #{method_name} -> #{klass.name}"
|
25
28
|
end
|
26
29
|
|
@@ -73,15 +76,11 @@ module ExpressTemplates
|
|
73
76
|
end
|
74
77
|
|
75
78
|
def self.inherited(subclass)
|
76
|
-
builder_method_and_class subclass.
|
77
|
-
end
|
78
|
-
|
79
|
-
def self.builder_method_name
|
80
|
-
to_s.demodulize.underscore
|
79
|
+
subclass.builder_method_and_class subclass.to_s.demodulize.underscore, subclass
|
81
80
|
end
|
82
81
|
|
83
|
-
def
|
84
|
-
self
|
82
|
+
def self.builder_method(name)
|
83
|
+
builder_method_and_class name, self
|
85
84
|
end
|
86
85
|
|
87
86
|
def self.descendants
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: express_templates
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Talcott Smith
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-09-
|
12
|
+
date: 2015-09-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|