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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c9690388e0ca299864aed881b05f1a49c6912431d12ddd88c19384dde4ac777
4
- data.tar.gz: 62844b59d26df478f5f5d192f546fa41b5cacc305980f88744b54c1766d781cd
3
+ metadata.gz: 2bdadb6a7633289833bc0a131f58283215d27d98b8023272849a1d193519f15e
4
+ data.tar.gz: 94b142e40198d2ff66b6ffee2132c6c1fb15d58a27a76207153539d7aaa99495
5
5
  SHA512:
6
- metadata.gz: 6beaa99c6447cb9d845a3e3994674b107f50932ee67a40c0d076e95af5f95d5d53e18d7c9c3f849e57421ab827a81527633e26ab38fe6d7e82095af82232c85b
7
- data.tar.gz: '0169b63e5093f4e6567589723367987c00c83170c46e3b960e2842a6d3be2127d2730ef4bc4973f8a817c2c0130a960588cb89814037f359c2b9dbdea048810c'
6
+ metadata.gz: ded0251185ec75a0d6a2f682b08e144278e734f4658e889c20cea2892f62ed0d636efcd01866015538ac72b7a6ce49d0944dc36f3a146c4732e9368aeaf3ca07
7
+ data.tar.gz: 05d548ec4d535b58c650393645aedfb6d4c8d685a3c073d4a64ca6c3d83f2027998e2362266f105601c442672f0cd4f4bef80d76f5fd927b052e5c76ebe0feca
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- html_fn (0.2.0)
4
+ html_fn (0.3.0)
5
5
  fn_reader
6
6
 
7
7
  GEM
@@ -1,7 +1,8 @@
1
1
 
2
2
  module HtmlFn
3
3
  module Attributes
4
- fn_reader :merge_attrs, :attrs_to_s, :string_property, :class_, :style
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
@@ -1,3 +1,3 @@
1
1
  module HtmlFn
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
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
- @@text = -> a { [a.to_s] }
24
+ @@div = node.(:div)
23
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html_fn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Chabot