Class: Sie::Parser::Tokenizer::Character

Inherits:
Object
  • Object
show all
Defined in:
lib/sie/parser/tokenizer/character.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#valueObject (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

Returns:

  • (Boolean)


16
17
18
# File 'lib/sie/parser/tokenizer/character.rb', line 16

def beginning_of_array?
  value == "{"
end

#end_of_array?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/sie/parser/tokenizer/character.rb', line 20

def end_of_array?
  value == "}"
end

#entry?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/sie/parser/tokenizer/character.rb', line 12

def entry?
  value == "#"
end

#non_whitespace?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/sie/parser/tokenizer/character.rb', line 28

def non_whitespace?
  value != " " && value != "\t"
end

#quote?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/sie/parser/tokenizer/character.rb', line 24

def quote?
  value == '"'
end

#unquoted_data?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/sie/parser/tokenizer/character.rb', line 8

def unquoted_data?
  non_whitespace? && !end_of_array?
end