HTML-AutoTag 1.0.0 → 1.0.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 +4 -4
- data/Changes +3 -0
- data/lib/HTML/AutoAttr.rb +4 -0
- data/lib/HTML/AutoTag.rb +1 -1
- data/lib/HTML/AutoTag/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8652395df3490769d14bdcfac34679723b0d5abc
|
4
|
+
data.tar.gz: 40b6c324542c872274c7bea5523cfa46cf7d6edd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df802abd00b4ba155e883f60988c206fdd37df168be5713d63904683443dabeb9941b2fbc131d791561c5887da3cff8ba4ecebf81018db805efd26c0d868ab02
|
7
|
+
data.tar.gz: 5a907014bbfbe83a65cd4f376537f0f977b45d6ee91c7a46f6d1fafe471407a6e4c57591b49843462f134eda9a05207c3399231229f0e5f30f8ee67a03d84898
|
data/Changes
CHANGED
data/lib/HTML/AutoAttr.rb
CHANGED
@@ -39,6 +39,7 @@ module HTML
|
|
39
39
|
end
|
40
40
|
|
41
41
|
# expects one argument: the key to scrub
|
42
|
+
#
|
42
43
|
def key( key )
|
43
44
|
key = key.gsub( /\s+/, '' )
|
44
45
|
key = key.gsub( /["'>=\/]/, '' )
|
@@ -53,7 +54,9 @@ module HTML
|
|
53
54
|
end
|
54
55
|
|
55
56
|
# expects one argument: the array to rotate
|
57
|
+
#
|
56
58
|
# returns the first element before array is rotated
|
59
|
+
#
|
57
60
|
def rotate( array )
|
58
61
|
val = array.shift
|
59
62
|
array.push( val )
|
@@ -61,6 +64,7 @@ module HTML
|
|
61
64
|
end
|
62
65
|
|
63
66
|
# expects one argument: the hash to 'stringify'
|
67
|
+
#
|
64
68
|
def stringify( hash )
|
65
69
|
|
66
70
|
keys = @sorted ? hash.keys.sort : hash.keys
|
data/lib/HTML/AutoTag.rb
CHANGED
@@ -19,8 +19,8 @@ module HTML
|
|
19
19
|
# Indentation level to start at. (integer)
|
20
20
|
#
|
21
21
|
# * sorted
|
22
|
+
# Sort attribute names of the tag alphabetically. (boolean)
|
22
23
|
#
|
23
|
-
Sort attribute names of the tag alphabetically. (boolean)
|
24
24
|
def initialize( params = {} )
|
25
25
|
@encodes = params['encodes'] ? 1 : 0
|
26
26
|
@indent = params['indent'] || ''
|
data/lib/HTML/AutoTag/version.rb
CHANGED