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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e97ae44b4cd0c3d5e7ce6d0031f435e75f30b42f
4
- data.tar.gz: 57ed6eeb0157d6f9f02f4eace7b18567cf72c717
3
+ metadata.gz: 77351e951a43fa098f87369232be07e4c7557a08
4
+ data.tar.gz: e58f2909cae09e642f7e3411fa047acc43f8b0d9
5
5
  SHA512:
6
- metadata.gz: 6a683f5a485998aa996feddedb9a45fbc60c7edcc5734e74863d0bfce3e8052328bfeaa15b8c6c60a72a102111b4e4010ded94986019bd2cfd70bdcdea798d6e
7
- data.tar.gz: b2ac9ec3c1cee810f2c0872f8233e0055250e31678b468c5576dcef740f0b491cda9a2cac62e52fcc13fa2f5a7deba74975b433293fdd379e35cd9b06b42aea2
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.builder_method_name, 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 builder_method_name
84
- self.class.builder_method_name
82
+ def self.builder_method(name)
83
+ builder_method_and_class name, self
85
84
  end
86
85
 
87
86
  def self.descendants
@@ -1,3 +1,3 @@
1
1
  module ExpressTemplates
2
- VERSION = "0.11.0"
2
+ VERSION = "0.11.1"
3
3
  end
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.0
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-01 00:00:00.000000000 Z
12
+ date: 2015-09-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport