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
179 180 181 |
# File 'lib/api/charset.rb', line 179 def charset @charset end |
#sequence ⇒ Object
The sequence of chars
178 179 180 |
# File 'lib/api/charset.rb', line 178 def sequence @sequence end |
Instance Method Details
#finalize ⇒ Object
194 195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'lib/api/charset.rb', line 194 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
185 186 187 |
# File 'lib/api/charset.rb', line 185 def sequence? true end |
#str ⇒ Object
189 190 191 192 |
# File 'lib/api/charset.rb', line 189 def str # A sequence char should never arrive unreplaced VIRTUAL_CHAR_OUTPUT end |
#virtual? ⇒ Boolean
181 182 183 |
# File 'lib/api/charset.rb', line 181 def virtual? false end |