cmless 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cmless.rb +2 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2a16d15914097df733758df778e02046ac51b97c
4
- data.tar.gz: 5cddab116a3ab382c0b368c689a3746aa844eac7
3
+ metadata.gz: eb8a359f53083d2d2da6220c06da3f6701281639
4
+ data.tar.gz: b80f25065a23c1c85f55c0998ee7c18bb9d0b30f
5
5
  SHA512:
6
- metadata.gz: ea5295bd65a53012ae6619eec0a2f2e4188da31d1f868bc6e8fd21db293a86c6eaf52c57fbbc8c33a86c561d17ec6671ae28b67c20c319c268e77704aa8a7c8a
7
- data.tar.gz: 8b92dc8fc197d66d4acd478950b3f8b979c1fada342a8a621a85ed58d4af5029a7106f7009e141c184a30c17bf460bd535ee760e864b53a9269a229761e01b21
6
+ metadata.gz: d03df5485f2b8120c4af361e13d5253131a06cb36f71fe5c5d5d5bcacb970e105856d917ac9c1421fc62f4e2ed86468bdb79ea86fb7e74ae06a92de6fb37f553
7
+ data.tar.gz: 569223ae59ed582ab39e30a7d7200110a3026dcddc6f4fc44b2d2946e064183c838c2e29ea9ad03b39f3d093d03a7e6fe706d16c4c58aaa38ab291b22df0549a
data/lib/cmless.rb CHANGED
@@ -9,6 +9,7 @@ require 'nokogiri'
9
9
  # CMS alternative: Content in markdown / Extract HTML and data for display
10
10
  class Cmless # rubocop:disable Metrics/ClassLength
11
11
  attr_reader :path
12
+ attr_reader :title
12
13
  attr_reader :title_html
13
14
 
14
15
  private
@@ -22,6 +23,7 @@ class Cmless # rubocop:disable Metrics/ClassLength
22
23
 
23
24
  doc.xpath('//h1').first.tap do |h1|
24
25
  @title_html = h1.inner_html
26
+ @title = h1.text
25
27
  h1.remove
26
28
  html_methods.delete(:title_html)
27
29
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cmless
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chuck McCallum