Class: TTFunk::Table::Name::String
- Inherits:
-
String
- Object
- String
- TTFunk::Table::Name::String
- Defined in:
- lib/ttfunk/table/name.rb
Instance Attribute Summary collapse
-
#encoding_id ⇒ Object
readonly
Returns the value of attribute encoding_id.
-
#language_id ⇒ Object
readonly
Returns the value of attribute language_id.
-
#platform_id ⇒ Object
readonly
Returns the value of attribute platform_id.
Instance Method Summary collapse
-
#initialize(text, platform_id, encoding_id, language_id) ⇒ String
constructor
A new instance of String.
- #strip_extended ⇒ Object
Constructor Details
#initialize(text, platform_id, encoding_id, language_id) ⇒ String
Returns a new instance of String.
11 12 13 14 15 16 |
# File 'lib/ttfunk/table/name.rb', line 11 def initialize(text, platform_id, encoding_id, language_id) super(text) @platform_id = platform_id @encoding_id = encoding_id @language_id = language_id end |
Instance Attribute Details
#encoding_id ⇒ Object (readonly)
Returns the value of attribute encoding_id.
8 9 10 |
# File 'lib/ttfunk/table/name.rb', line 8 def encoding_id @encoding_id end |
#language_id ⇒ Object (readonly)
Returns the value of attribute language_id.
9 10 11 |
# File 'lib/ttfunk/table/name.rb', line 9 def language_id @language_id end |
#platform_id ⇒ Object (readonly)
Returns the value of attribute platform_id.
7 8 9 |
# File 'lib/ttfunk/table/name.rb', line 7 def platform_id @platform_id end |
Instance Method Details
#strip_extended ⇒ Object
18 19 20 21 22 |
# File 'lib/ttfunk/table/name.rb', line 18 def strip_extended stripped = gsub(/[\x00-\x19\x80-\xff]/n, "") stripped = "[not-postscript]" if stripped.empty? return stripped end |