html_fn 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/html_fn/attributes.rb +6 -1
- data/lib/html_fn/version.rb +1 -1
- data/lib/html_fn.rb +4 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2bdadb6a7633289833bc0a131f58283215d27d98b8023272849a1d193519f15e
|
4
|
+
data.tar.gz: 94b142e40198d2ff66b6ffee2132c6c1fb15d58a27a76207153539d7aaa99495
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ded0251185ec75a0d6a2f682b08e144278e734f4658e889c20cea2892f62ed0d636efcd01866015538ac72b7a6ce49d0944dc36f3a146c4732e9368aeaf3ca07
|
7
|
+
data.tar.gz: 05d548ec4d535b58c650393645aedfb6d4c8d685a3c073d4a64ca6c3d83f2027998e2362266f105601c442672f0cd4f4bef80d76f5fd927b052e5c76ebe0feca
|
data/Gemfile.lock
CHANGED
data/lib/html_fn/attributes.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
|
2
2
|
module HtmlFn
|
3
3
|
module Attributes
|
4
|
-
fn_reader :merge_attrs, :attrs_to_s, :string_property,
|
4
|
+
fn_reader :merge_attrs, :attrs_to_s, :string_property,
|
5
|
+
:class_, :style, :name, :content, :href, :rel
|
5
6
|
|
6
7
|
# Your code goes here...
|
7
8
|
# module HtmlFnc
|
@@ -31,5 +32,9 @@ module HtmlFn
|
|
31
32
|
|
32
33
|
@@class_ = string_property.(:class)
|
33
34
|
@@id_ = string_property.(:id)
|
35
|
+
@@name = string_property.(:name)
|
36
|
+
@@content = string_property.(:content)
|
37
|
+
@@href = string_property.(:href)
|
38
|
+
@@rel = string_property.(:rel)
|
34
39
|
end
|
35
40
|
end
|
data/lib/html_fn/version.rb
CHANGED
data/lib/html_fn.rb
CHANGED
@@ -4,7 +4,7 @@ require "html_fn/attributes"
|
|
4
4
|
|
5
5
|
module HtmlFn
|
6
6
|
fn_reader :tag, :table, :thead, :tr, :th, :td, :tbody, :text, :headers, :row, :html_table,
|
7
|
-
:node, :table, :thead, :th, :td, :th, :tbody
|
7
|
+
:node, :table, :thead, :th, :td, :th, :tbody, :div
|
8
8
|
|
9
9
|
@@node = -> tag, attrs, elems {
|
10
10
|
<<EOF
|
@@ -12,6 +12,8 @@ module HtmlFn
|
|
12
12
|
EOF
|
13
13
|
}.curry
|
14
14
|
|
15
|
+
@@text = -> a { [a.to_s] }
|
16
|
+
|
15
17
|
@@script = node.(:script)
|
16
18
|
@@table = node.(:table)
|
17
19
|
@@thead = node.(:thead)
|
@@ -19,5 +21,5 @@ EOF
|
|
19
21
|
@@th = node.(:th)
|
20
22
|
@@td = node.(:td)
|
21
23
|
@@tbody = node.(:tbody)
|
22
|
-
@@
|
24
|
+
@@div = node.(:div)
|
23
25
|
end
|