Class: Sie::Parser::Tokenizer::Character
- Inherits:
-
Object
- Object
- Sie::Parser::Tokenizer::Character
- Defined in:
- lib/sie/parser/tokenizer/character.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #beginning_of_array? ⇒ Boolean
- #end_of_array? ⇒ Boolean
- #entry? ⇒ Boolean
- #non_whitespace? ⇒ Boolean
- #quote? ⇒ Boolean
- #unquoted_data? ⇒ Boolean
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
6 7 8 |
# File 'lib/sie/parser/tokenizer/character.rb', line 6 def value @value end |
Instance Method Details
#beginning_of_array? ⇒ Boolean
16 17 18 |
# File 'lib/sie/parser/tokenizer/character.rb', line 16 def beginning_of_array? value == "{" end |
#end_of_array? ⇒ Boolean
20 21 22 |
# File 'lib/sie/parser/tokenizer/character.rb', line 20 def end_of_array? value == "}" end |
#entry? ⇒ Boolean
12 13 14 |
# File 'lib/sie/parser/tokenizer/character.rb', line 12 def entry? value == "#" end |
#non_whitespace? ⇒ Boolean
28 29 30 |
# File 'lib/sie/parser/tokenizer/character.rb', line 28 def non_whitespace? value != " " && value != "\t" end |
#quote? ⇒ Boolean
24 25 26 |
# File 'lib/sie/parser/tokenizer/character.rb', line 24 def quote? value == '"' end |
#unquoted_data? ⇒ Boolean
8 9 10 |
# File 'lib/sie/parser/tokenizer/character.rb', line 8 def unquoted_data? non_whitespace? && !end_of_array? end |