listify 0.0.3 → 0.1.0
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/README.md +16 -1
- data/lib/listify.rb +3 -3
- data/lib/listify/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e02be46eb90c0bf7f85e55772515b7c7aef935fa
|
4
|
+
data.tar.gz: a6296464e606c1da0752c64cf8a630f6920bcb14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c704d3f2ba216dc479da151704082eb15351294e2ded2e6f98adefc46c1d2cc37fb21cb395e2dedc9efca6168de20b5d92fd2646c442366b43c6ee1b55672758
|
7
|
+
data.tar.gz: fed6d8b7d6c8a1d34e53f296364a08520b695d891e86f504ce59dac4a765078a4d93f222adbb3f58b90eef9c895c24000fec8d72393fce4d6d1807c44c7414e7
|
data/README.md
CHANGED
@@ -23,7 +23,20 @@ listify( ['first item', 'second item', 'third item'] )
|
|
23
23
|
<li>second item</li>
|
24
24
|
<li>third item</li>
|
25
25
|
</ul>"
|
26
|
-
```
|
26
|
+
```
|
27
|
+
|
28
|
+
###HTML Attributes
|
29
|
+
|
30
|
+
Attributes can be specified for the outer tag
|
31
|
+
```
|
32
|
+
listify( ['first item', 'second item', 'third item'], class: 'todo-list' )
|
33
|
+
=> "<ul class="todo-list">
|
34
|
+
<li>first item</li>
|
35
|
+
<li>second item</li>
|
36
|
+
<li>third item</li>
|
37
|
+
</ul>"
|
38
|
+
```
|
39
|
+
|
27
40
|
###Multilevel lists
|
28
41
|
|
29
42
|
Hashes are rendered as a sub-list:
|
@@ -91,3 +104,5 @@ listify( {'First-Category' => ['item-one', 'item-two'],
|
|
91
104
|
<li>Fourth-Item</li>
|
92
105
|
</ul>"
|
93
106
|
```
|
107
|
+
|
108
|
+
[](https://codeclimate.com/github/bappelt/listify)
|
data/lib/listify.rb
CHANGED
@@ -30,9 +30,9 @@ module Listify
|
|
30
30
|
# </ul>
|
31
31
|
# </li>
|
32
32
|
# </ul>"
|
33
|
-
def listify(collection)
|
34
|
-
content_tag :ul do
|
35
|
-
|
33
|
+
def listify(collection, options = {})
|
34
|
+
content_tag :ul, options do
|
35
|
+
list_items_for(collection)
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
data/lib/listify/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: listify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 'Byron Appelt '
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|