Class: Glaemscribe::API::Charset::SequenceChar
- Defined in:
- lib/api/charset.rb
Instance Attribute Summary collapse
-
#charset ⇒ Object
Pointer to parent charset.
-
#line ⇒ Object
Line of code.
-
#names ⇒ Object
Names.
-
#sequence ⇒ Object
The sequence of chars.
Instance Method Summary collapse
Instance Attribute Details
#charset ⇒ Object
Pointer to parent charset
138 139 140 |
# File 'lib/api/charset.rb', line 138 def charset @charset end |
#sequence ⇒ Object
The sequence of chars
137 138 139 |
# File 'lib/api/charset.rb', line 137 def sequence @sequence end |
Instance Method Details
#finalize ⇒ Object
153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/api/charset.rb', line 153 def finalize if @sequence.count == 0 @charset.errors << Glaeml::Error.new(@line, "Sequence for sequence char is empty.") end @sequence.each{ |symbol| # Check that the sequence is correct found = @charset[symbol] if !found @charset.errors << Glaeml::Error.new(@line, "Sequence char #{symbol} cannot be found in the charset.") end } end |
#sequence? ⇒ Boolean
144 145 146 |
# File 'lib/api/charset.rb', line 144 def sequence? true end |
#str ⇒ Object
148 149 150 151 |
# File 'lib/api/charset.rb', line 148 def str # A sequence char should never arrive unreplaced VIRTUAL_CHAR_OUTPUT end |
#virtual? ⇒ Boolean
140 141 142 |
# File 'lib/api/charset.rb', line 140 def virtual? false end |