summarise 1.0.2 → 1.0.3

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: e6bdc7096f1b34e24a113899bc64c1ba97105154
4
- data.tar.gz: 62a9a0c6a55bd88a2f92ca723fd209da364e8aa1
3
+ metadata.gz: ece8bc3795402c67d91eac7c561bf96d065d944f
4
+ data.tar.gz: 8a317443626495aa93288d9ca1ddbdf4b9cff185
5
5
  SHA512:
6
- metadata.gz: 2196edf399c99a41371d0b0783915762f45b4b69b0b147b0d17ae4c386be606b2b990663595def20b13010db8382eb0b27cd986663278430bd2a4eb9d44de7e7
7
- data.tar.gz: bdb9aeb4e3d93c806ade5800dd9ac73b4d7235bca32d509004b86478ea903844767f806053bdefb5fbe8d4b207fac6965239a9fecb169c52e0abee852f6a3d88
6
+ metadata.gz: fccaab3337862dc02124da89b8c9009942ff7a6b1543f97b6a30ae4d996d8d3eb4e80996bf19112381f3c9306b95d81631a26ec21145e9fac61ff537b0209b36
7
+ data.tar.gz: e3db78cfe0e143fabdf9e1996248c1a73a98ef9ae599baede7a5242f60bc9048c0788136890f87eaf8dc644e5d8e90e1d7e54e7f30e9b7654cb639236ddc1671
@@ -1,7 +1,7 @@
1
1
 
2
2
  module Summarise
3
3
  module StringExtensions
4
- def summarize(l=200, args={})
4
+ def summarise(l=200, args={})
5
5
  i = 0
6
6
  summary = self.split.map{ |word| word if (i += word.length) < l}.compact.join(' ')
7
7
  if args[:suffix] && self != summary
@@ -10,8 +10,12 @@ module Summarise
10
10
  summary
11
11
  end
12
12
 
13
- def summarisable?(length=200)
13
+ def summarizable?(length=200)
14
14
  return self.summarise(length) != self
15
15
  end
16
+
17
+ alias_method :summarize, :summarise
18
+ alias_method :summarizable?, :summarisable?
19
+
16
20
  end
17
21
  end
@@ -1,3 +1,3 @@
1
1
  module Summarise
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: summarise
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicholas Johnson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-27 00:00:00.000000000 Z
11
+ date: 2013-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler