listify 0.0.3 → 0.1.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
  SHA1:
3
- metadata.gz: 611378efc5e5daac73bb837a84cd67f59ef69a5b
4
- data.tar.gz: daba1c279974a1429abc08204d35a4e49f9505ed
3
+ metadata.gz: e02be46eb90c0bf7f85e55772515b7c7aef935fa
4
+ data.tar.gz: a6296464e606c1da0752c64cf8a630f6920bcb14
5
5
  SHA512:
6
- metadata.gz: e02c284089d2d4ebbf69ff5a5bac0f8bde3e5d2846cf099474b6ed0ee8016046a868efe902f3057ed14902567b18e9271f19bc77922fa0977e9b940eb0699596
7
- data.tar.gz: 6aca238fa49a097dfc814b0ba4b49373b3a4129c2b782d507ddac95976e00aba429c8650f55bfca94c20f31edea8ee58161e5e501e916936e02fbb101fc0ff8b
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
+ [![Code Climate](https://codeclimate.com/github/bappelt/listify.png)](https://codeclimate.com/github/bappelt/listify)
@@ -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
- concat list_items_for(collection)
33
+ def listify(collection, options = {})
34
+ content_tag :ul, options do
35
+ list_items_for(collection)
36
36
  end
37
37
  end
38
38
 
@@ -1,3 +1,3 @@
1
1
  module Listify
2
- VERSION = "0.0.3"
2
+ VERSION = "0.1.0"
3
3
  end
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.3
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-12 00:00:00.000000000 Z
11
+ date: 2013-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails