bable 0.2.0 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b6e37b28c00f6965d3cfa0bdc3831361d58ea6c1
4
- data.tar.gz: e0f3c6e2733ad047028c6aac3c8eac187934c8a7
3
+ metadata.gz: 37048b58ef343157e1b1e814675f0ea3af91154d
4
+ data.tar.gz: f4700a22d82039b0629ac569d9aca43d4829708a
5
5
  SHA512:
6
- metadata.gz: 987cbdb6007c0afcb4c50450f65e6f87f6d19248ecd5d9766f1cae4bb9e979840e7e913ecd7d346fd9475eafa91e8df32fc2b399a0be11d909967045393484a2
7
- data.tar.gz: 4cc18d457706bede81376d6d185445875a7e9b99f274302ef37c0b0002eaef3e35cdbd26df8b2db7dd55d4831512b3b44c0a7180a79b84b3b1b177f3729eb314
6
+ metadata.gz: d2e25ea3fb2f2a9cc6bf2d74ae2539e6e23951398efdc2e5b3e56e72d91ed2b16e8e4d9a46b00771fbf0f82eb77966107e709bc7eb429d08fd20e0f2b02cc5f6
7
+ data.tar.gz: da56b07a3f01eead3c05f4fb86fa7976fb3a0d8ff6bb949d106b56c0f5d076c7fb8c6daff2d549b8f0c1376d520b3be8adf521984f3514857f5bb08af73e5dc8
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  # Bable: Text readability indexes calculator
7
7
 
8
- Bable is a library that will allow you calculate quantitative readability indexes of a given text. Read more about readability tests here: [](https://en.wikipedia.org/wiki/Readability_test).
8
+ Bable is a library that will allow you calculate quantitative readability indexes of a given text. Read more about readability tests here: [https://en.wikipedia.org/wiki/Readability_test](https://en.wikipedia.org/wiki/Readability_test).
9
9
 
10
10
  Besides calculating indexes (currently available: `Automated Readability Index` and `Coleman-Liau index`), it will help you build your own index calculator, giving you the structure and the helper methods for making the process smoother.
11
11
 
@@ -48,9 +48,10 @@ index.calc # => 7.72
48
48
 
49
49
  ## Implement your own index
50
50
 
51
- If you want to implement your own index you just need to create a subclass of `Bable::Index::Base` and define a method `#calc` in it, where you'll calculate the actual formula. Note that instances of `Bable::Index::Base` will come with a `#text` attribute reader, which returns a decorator of `String`, the class `StatisticString` (see [lib/bable/statistic_string.rb](lib/bable/statistic_string.rb) ). You can take advantage of all those methods for implement your index.
51
+ If you want to implement your own index you just need to create a subclass of `Bable::Index::Base` and define a method `#calc` in it, where you'll calculate the actual formula. Note that instances of `Bable::Index::Base` will come with a `#text` attribute reader, which returns a decorator of `String`, the class `StatisticString` (look at [http://www.rubydoc.info/github/danimashu/bable/master/Bable/StatisticString](http://www.rubydoc.info/github/danimashu/bable/master/Bable/StatisticString)). You can take advantage of all those methods when implementing your own index.
52
52
 
53
53
  ```ruby
54
+ # Your index
54
55
  module Bable
55
56
  module Index
56
57
  class MyNewIndex < Base
@@ -1,3 +1,5 @@
1
+ require "delegate"
2
+
1
3
  module Bable
2
4
  class StatisticString < SimpleDelegator
3
5
  WORD_REGEX = /\w+/
@@ -1,3 +1,3 @@
1
1
  module Bable
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Madrid