hebrew 0.1.6 → 0.1.7

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/hebrew.rb +4 -9
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: db796d5a2e993a3e80c0533e59be71ddea35ff77
4
- data.tar.gz: 907c43cec960cd4080f81084d555e627174e71cc
3
+ metadata.gz: e744e020d212f7b11acbb82e9e4d99944fc3d06c
4
+ data.tar.gz: 3f0fb1762473e8b52a4fbf7b33b8251e3a632a08
5
5
  SHA512:
6
- metadata.gz: c3d0e503b1ad747277dd6aa9ed98fcdf1ea32838bfd396f00657fb834f6715454d81a8bd23f66c0196085f62b763e6f2504c1bf0765f1f685958db92974e1851
7
- data.tar.gz: 3c5221280f64cc1338f10ecf32fe73f3ce2bed78963d67c575179eb286eb64d7eed1e72c7bb84da2d89f75b0f55be8486f06cbd5d45346017e0e7d93f53ca595
6
+ metadata.gz: eeb8e700eaa11b89dbfd77107cb09d15a56de4c5eab1320301fb1445d411ae2e6bc527195f6c83cb24e9189ed09c36a039d458cb19d665d7700952e4d6868151
7
+ data.tar.gz: f8ded3902c477c207425e64daf813f7f403b9d8652dba662508b6f179e1421ca4a8e3573f12fbd52babcb35e57389c67ef8d0406b3da104122c8129723cc015f
data/lib/hebrew.rb CHANGED
@@ -59,15 +59,10 @@ class String
59
59
  end
60
60
  end
61
61
  def is_hebrew_codepoint_cp1255(cp)
62
- if (cp > 191 && cp < 202) or [203, 204, 209, 210].include?(cp)
63
-
62
+ return ((cp > 191 && cp < 202) or [203, 204, 209, 210].include?(cp))
64
63
  end
65
64
  def is_hebrew_codepoint_utf8(cp)
66
- if cp >= HEB_UTF8_START && cp <= HEB_UTF8_END
67
- return true
68
- else
69
- return false
70
- end
65
+ return (cp >= HEB_UTF8_START && cp <= HEB_UTF8_END)
71
66
  end
72
67
 
73
68
  # TODO: add strip_nikkud!
@@ -78,11 +73,11 @@ class String
78
73
  end
79
74
 
80
75
  def self.is_codepoint_nikkud_cp1255(cp)
81
- return (cp > 191 && cp < 205) or [209, 210].include?(cp)
76
+ return ((cp > 191 && cp < 205) or [209, 210].include?(cp))
82
77
  #NIKKUD_CP1255.include?(cp) # cleaner, but much slower
83
78
  end
84
79
  def self.is_codepoint_nikkud_utf8(cp)
85
- return (cp > 0x05af && cp < 0x05ba) or [0x05bb, 0x05bc, 0x05c1, 0x05c2].include?(cp)
80
+ return ((cp > 0x05af && cp < 0x05ba) or [0x05bb, 0x05bc, 0x05c1, 0x05c2].include?(cp))
86
81
  #NIKKUD_UTF8.include?(cp) # cleaner, but much slower
87
82
  end
88
83
  # this will return true if the first parameter is a nikkud character in the encoding of the second parameter
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hebrew
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Asaf Bartov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-02 00:00:00.000000000 Z
11
+ date: 2014-04-03 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Some useful code to identify, transcode, and manipulate Hebrew text
14
14
  email: asaf.bartov@gmail.com
@@ -27,12 +27,12 @@ require_paths:
27
27
  - lib
28
28
  required_ruby_version: !ruby/object:Gem::Requirement
29
29
  requirements:
30
- - - ">="
30
+ - - '>='
31
31
  - !ruby/object:Gem::Version
32
32
  version: '0'
33
33
  required_rubygems_version: !ruby/object:Gem::Requirement
34
34
  requirements:
35
- - - ">="
35
+ - - '>='
36
36
  - !ruby/object:Gem::Version
37
37
  version: '0'
38
38
  requirements: []