rtl 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +22 -10
  3. data/lib/rtl/core.rb +1 -1
  4. data/lib/rtl/version.rb +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1a86faa9860088b875b32f4c1d5c3338992e21d6
4
- data.tar.gz: 33a7f7dbbc882768b3a028e36398ccb38bfe8d8a
3
+ metadata.gz: f29ce6d7cd35feb3e394b9db19248d5fb1ed1209
4
+ data.tar.gz: 4764067b643f9ff4be3db94b1186984e1c23de10
5
5
  SHA512:
6
- metadata.gz: d650eb3ed73341f35915cecb96a176d81c1ef72a44f126966282d55c73b7e9f1522443de969d17d6255741b3c9151acebe7112c9875e60754ce8250b7aa682ad
7
- data.tar.gz: 94236b3ccad637985c7853c99790b3ab6481433479ac4ab73e16f56c0924ef9ae98fcbaec3cf327d7e94a6f069353d2876da952941317a0672b9928c2526743a
6
+ metadata.gz: 0f0f31ad9f71b08c39c1702584a8f12d8a0a65d95946942839d328ec536a64cfc6ea6d7f318e313a768aa338d75e047d09aec9aea26f21f3ae99f5f197a8787c
7
+ data.tar.gz: b3b00a657fb73e1b0faec27ecac519d8f59b65eb60971ecf2f0b77a23a5b4b9fce6a7151054e00750645d979d51445c1aa62e90f3116adcf6769f0481620d33e
data/README.md CHANGED
@@ -1,7 +1,8 @@
1
1
  # RTL
2
+ [![Gem Version](https://badge.fury.io/rb/rtl.svg)](https://rubygems.org/gems/rtl)
2
3
  [![Build Status](https://travis-ci.org/abarrak/rtl.svg?branch=master)](https://travis-ci.org/abarrak/rtl)
3
4
 
4
- This gem helps you in checking whether a language is written from right-to-left (RTL) or vise versa.
5
+ This gem helps you check whether a language direction is right-to-left (RTL) or left-to-right (LTR) implicitly, by supplying its full name, iso code, or other options.
5
6
 
6
7
  ## Installation
7
8
 
@@ -25,42 +26,53 @@ $ gem install rtl
25
26
 
26
27
  ## Usage
27
28
 
29
+ #### Query a language by string or symbol:
30
+
28
31
  ```ruby
29
32
  require 'rtl'
30
33
 
31
- # Query a language by string or symbol.
32
34
  Rtl.rtl? 'ar' #=> true
33
35
  Rtl.rtl? :ara #=> true
36
+ ```
34
37
 
38
+ #### Query a language by ISO 639 code, (the default) ..
35
39
 
36
- # By ISO 639 code, (The default) ..
40
+ ```ruby
37
41
  Rtl.rtl? :syc, :iso_code #=> true
38
42
  Rtl.rtl? :eng #=> false
43
+ ```
39
44
 
45
+ #### Or by ISO 15924 code ..
40
46
 
41
- # By ISO 15924 code ..
47
+ ```ruby
42
48
  Rtl.rtl? 'Hung', :iso_long_code #=> true
49
+ ```
43
50
 
51
+ #### Or by ISO number ..
44
52
 
45
- # By ISO number ..
53
+ ```ruby
46
54
  Rtl.rtl? 130, :iso_number #=> true
55
+ ```
47
56
 
48
-
49
- # By unicode alias ..
57
+ #### Or by unicode alias ..
58
+ ```ruby
50
59
  Rtl.rtl? 'Hebrew', :unicode_alias #=> true
60
+ ```
51
61
 
62
+ #### Or by full name ..
52
63
 
53
- # By full name ..
64
+ ```ruby
54
65
  Rtl.rtl? :Persian, :full_name #=> true
66
+ ```
55
67
 
68
+ #### Get List of all languages by any of the above criteria:
56
69
 
57
- # Get List of all languages by any of the above criteria
70
+ ```ruby
58
71
  Rtl.rtl_languages
59
72
  #=> ["ar", "ara", "arc", "ae", "ave", "egy", "he", "heb", "nqo", "pal", "phn", "sam", "syc", "syr", "fa", "per", "fas", "ku", "kur"]
60
73
 
61
74
  Rtl.rtl_languages :iso_long_code
62
75
  #=> ...
63
-
64
76
  ```
65
77
 
66
78
  ## Useful Links
@@ -56,7 +56,7 @@ module Rtl
56
56
  when :full_name
57
57
  self.full_names l
58
58
  when :all
59
- all l
59
+ self.all l
60
60
  else
61
61
  raise ArgumentError.new "Unknown base value #{base}."
62
62
  end
@@ -1,3 +1,3 @@
1
1
  module Rtl
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rtl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abdullah Barrak (abarrak)