Class: WikiCloth::Token

Inherits:
Object show all
Defined in:
lib/wikicloth/math.rb

Constant Summary collapse

Plus =
0
Minus =
1
Multiply =
2
Divide =
3
Number =
4
LParen =
5
RParen =
6
End =
7

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeToken

Returns a new instance of Token.



20
21
22
23
# File 'lib/wikicloth/math.rb', line 20

def initialize
  @kind = nil
  @value = nil
end

Instance Attribute Details

#kindObject

Returns the value of attribute kind.



17
18
19
# File 'lib/wikicloth/math.rb', line 17

def kind
  @kind
end

#valueObject

Returns the value of attribute value.



18
19
20
# File 'lib/wikicloth/math.rb', line 18

def value
  @value
end

Instance Method Details

#unknown?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/wikicloth/math.rb', line 25

def unknown?
  @kind.nil?
end