Class: UnicodeScriptDetector::Character
- Inherits:
-
Object
- Object
- UnicodeScriptDetector::Character
- Defined in:
- lib/unicode_script_detector/character.rb
Instance Attribute Summary collapse
-
#char ⇒ Object
readonly
Returns the value of attribute char.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#script ⇒ Object
readonly
Returns the value of attribute script.
Instance Method Summary collapse
- #hiragana? ⇒ Boolean
-
#initialize(char, script, name) ⇒ Character
constructor
A new instance of Character.
- #latin? ⇒ Boolean
Constructor Details
#initialize(char, script, name) ⇒ Character
Returns a new instance of Character.
5 6 7 8 9 |
# File 'lib/unicode_script_detector/character.rb', line 5 def initialize(char, script, name) @char = char @script = script @name = name end |
Instance Attribute Details
#char ⇒ Object (readonly)
Returns the value of attribute char.
3 4 5 |
# File 'lib/unicode_script_detector/character.rb', line 3 def char @char end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/unicode_script_detector/character.rb', line 3 def name @name end |
#script ⇒ Object (readonly)
Returns the value of attribute script.
3 4 5 |
# File 'lib/unicode_script_detector/character.rb', line 3 def script @script end |
Instance Method Details
#hiragana? ⇒ Boolean
15 16 17 |
# File 'lib/unicode_script_detector/character.rb', line 15 def hiragana? @script === :Hiragana end |
#latin? ⇒ Boolean
11 12 13 |
# File 'lib/unicode_script_detector/character.rb', line 11 def latin? @script === :Latin end |