hebrew 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hebrew.rb +4 -9
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e744e020d212f7b11acbb82e9e4d99944fc3d06c
|
4
|
+
data.tar.gz: 3f0fb1762473e8b52a4fbf7b33b8251e3a632a08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
|
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.
|
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-
|
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: []
|