rxhp 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rxhp/composable_element.rb +2 -12
- data/lib/rxhp/custom_element.rb +15 -0
- metadata +5 -5
@@ -1,5 +1,4 @@
|
|
1
|
-
require 'rxhp/
|
2
|
-
require 'rxhp/element'
|
1
|
+
require 'rxhp/custom_element'
|
3
2
|
require 'rxhp/fragment'
|
4
3
|
|
5
4
|
module Rxhp
|
@@ -9,16 +8,7 @@ module Rxhp
|
|
9
8
|
#
|
10
9
|
# Most of the time, those children will either be ComposableElement's in
|
11
10
|
# turn, or subclasses of Rxhp::HtmlElement
|
12
|
-
class ComposableElement < Rxhp::
|
13
|
-
include Rxhp::AttributeValidator
|
14
|
-
|
15
|
-
# Check that there are no detectable problems, such as invalid
|
16
|
-
# attributes.
|
17
|
-
def validate!
|
18
|
-
super
|
19
|
-
validate_attributes!
|
20
|
-
end
|
21
|
-
|
11
|
+
class ComposableElement < Rxhp::CustomElement
|
22
12
|
# You don't want to implement this function in your subclasses -
|
23
13
|
# just reimplement compose instead.
|
24
14
|
#
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'rxhp/attribute_validator'
|
2
|
+
require 'rxhp/element'
|
3
|
+
|
4
|
+
module Rxhp
|
5
|
+
class CustomElement < Rxhp::Element
|
6
|
+
include Rxhp::AttributeValidator
|
7
|
+
|
8
|
+
# Check that there are no detectable problems, such as invalid
|
9
|
+
# attributes.
|
10
|
+
def validate!
|
11
|
+
super
|
12
|
+
validate_attributes!
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rxhp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,8 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
13
|
-
default_executable:
|
12
|
+
date: 2012-08-12 00:00:00.000000000 Z
|
14
13
|
dependencies: []
|
15
14
|
description: An object-oriented validating HTML template system
|
16
15
|
email:
|
@@ -22,6 +21,7 @@ files:
|
|
22
21
|
- lib/rxhp/attribute_validator.rb
|
23
22
|
- lib/rxhp/composable_element.rb
|
24
23
|
- lib/rxhp/constants.rb
|
24
|
+
- lib/rxhp/custom_element.rb
|
25
25
|
- lib/rxhp/data/html/attributes.rb
|
26
26
|
- lib/rxhp/data/html/tags.rb
|
27
27
|
- lib/rxhp/element.rb
|
@@ -35,7 +35,6 @@ files:
|
|
35
35
|
- lib/rxhp/scope.rb
|
36
36
|
- lib/rxhp/tags/html_tag.rb
|
37
37
|
- lib/rxhp.rb
|
38
|
-
has_rdoc: true
|
39
38
|
homepage: https://github.com/fredemmott/rxhp
|
40
39
|
licenses: []
|
41
40
|
post_install_message:
|
@@ -56,8 +55,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
56
55
|
version: '0'
|
57
56
|
requirements: []
|
58
57
|
rubyforge_project:
|
59
|
-
rubygems_version: 1.
|
58
|
+
rubygems_version: 1.8.24
|
60
59
|
signing_key:
|
61
60
|
specification_version: 3
|
62
61
|
summary: An object-oriented validating HTML template system
|
63
62
|
test_files: []
|
63
|
+
has_rdoc:
|