madman 0.2.9 → 0.2.10

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: 60c061af738d6d3b7230deb983106d9f7048a7e37f8eaf0c26d5aac99c41af9e
4
- data.tar.gz: 9080e9b62319d7038f5847e49aa0bc799f7da36aa665e345e962b6e528449b36
3
+ metadata.gz: fea5fb59af24dad5a8f2da62bff33cc73b077fe35d48f06b0a2895bccf9884de
4
+ data.tar.gz: a696944e3f4a5daf6ab1f1d10ec0b330af01320267e8876125a152d739aa2dea
5
5
  SHA512:
6
- metadata.gz: 4c0144818df47c80e9e8758fb932cd1238eccea30615a68413e434d9b49da1d7b64e9ed02ab763c4214aa478e1d4a3d1f49a0e3634e83f83d30586c7914b121c
7
- data.tar.gz: 934dbe15c427f51d1638b3aff0c9e653001f8eef3407133a62947232ab4305b57aafe82b9f8b50ad4314abf2512f1e8f213a01930377349396d3f95950156250
6
+ metadata.gz: ca89b4634cc7f5c8bc0df8e7868afcc73f4aeb878a4df3ff80b8627a7e572119ea17c1587f6813cee33d1a650c5ed23be87ff3b22fd87fd861933e0469ec944c
7
+ data.tar.gz: 4966565ceff228bdfbf57af9f89aef554a1a3a9d58170066139a17c9be560d80a04262a876b5218a5f3d1087a3e4406ce455b56f4415f417fdf8a70b5333c080
@@ -0,0 +1,11 @@
1
+ module ArrayRefinements
2
+ refine Array do
3
+ def to_markdown
4
+ map { |item| "- #{item}"}.join "\n"
5
+ end
6
+
7
+ def to_html
8
+ CommonMarker.render_html to_markdown, :DEFAULT, [:table]
9
+ end
10
+ end
11
+ end
@@ -1,3 +1,3 @@
1
1
  module Madman
2
- VERSION = "0.2.9"
2
+ VERSION = "0.2.10"
3
3
  end
@@ -1,8 +1,10 @@
1
1
  require 'madman/refinements/string'
2
+ require 'madman/refinements/array'
2
3
 
3
4
  module Madman
4
5
  class YAMLDoc
5
6
  using StringRefinements
7
+ using ArrayRefinements
6
8
 
7
9
  attr_reader :yaml, :title
8
10
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: madman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Ben Shitrit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-25 00:00:00.000000000 Z
11
+ date: 2020-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra
@@ -202,6 +202,7 @@ files:
202
202
  - lib/madman/item.rb
203
203
  - lib/madman/navigation.rb
204
204
  - lib/madman/preview_server.rb
205
+ - lib/madman/refinements/array.rb
205
206
  - lib/madman/refinements/string.rb
206
207
  - lib/madman/renderers.rb
207
208
  - lib/madman/renderers/default.rb