html_format 0.0.7 → 0.0.8

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: d767913d08b8c34aafee0b33c306f527a7730b2718795ebece283f3ebde0f8f1
4
- data.tar.gz: 10972f0f8128454b7121bea85cae0087954ef569d595ff6b3c622bf41612b330
3
+ metadata.gz: 65ba6be4011eca708cdbcc238a182d0d758074cb4e53c54d5bef84d48f0e437f
4
+ data.tar.gz: 9a715f1a46abc3baf6e8658d4e639f35d0d4232fa8735c13f9505a1d940e95a6
5
5
  SHA512:
6
- metadata.gz: 68e8ac0227bf2bbfbfd444579013afd4a42027012fc4184ddd2c5f11137ac5daca30a21819daca77f81100e997fe4c387897e3d56b60cd88bb11c3b1317f8dde
7
- data.tar.gz: a635d4d1158b2e30756a640811211b3a1acde5968f801438bb66dc601b9404e89db86a3bb5e8a47ede9d514f7e47410992bc1039a963058044d76b23d5c32b41
6
+ metadata.gz: 596ee31c1f12ceee1fcd511453f897fbc2b19caa4dd2d1ef7c0596a7000c1aa7f43cac5c0b891ce57160ab0d7f9148f2301e98929d2553156bae7ca93b08616d
7
+ data.tar.gz: 745df4d51db228c6643f4a2d65ee04ebeeca86cc61339897c2e6f4ead2dfb24b1baea3119bc65b8cb4366658546b2ac371f086f8fff09a2ac00b9529650a3965
@@ -17,9 +17,13 @@ end
17
17
  Kernel.class_eval do
18
18
  private
19
19
 
20
- def html_format(object, **options)
20
+ def html_format(object = nil, options = {}, &block)
21
+ if block
22
+ options = object || {}
23
+ object = yield
24
+ end
21
25
  if object.respond_to?(:to_html)
22
- object.to_html
26
+ object.to_html(options)
23
27
  else
24
28
  HtmlFormat.generate(object, options)
25
29
  end
@@ -1,3 +1,3 @@
1
1
  module HtmlFormat
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html_format
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - akicho8