Class: TheFox::Range::Lexer::BlockLevel

Inherits:
Object
  • Object
show all
Defined in:
lib/thefox-ext/range/lexer/block_level.rb

Instance Method Summary collapse

Constructor Details

#initializeBlockLevel

Returns a new instance of BlockLevel.



6
7
8
9
# File 'lib/thefox-ext/range/lexer/block_level.rb', line 6

def initialize()
  # puts '-> BlockLevel.initialize()'
  @level = 0
end

Instance Method Details

#==(other) ⇒ Object



29
30
31
32
33
# File 'lib/thefox-ext/range/lexer/block_level.rb', line 29

def ==(other)
  if other.is_a?(BlockLevel)
    @level == other.level
  end
end

#decObject



21
22
23
# File 'lib/thefox-ext/range/lexer/block_level.rb', line 21

def dec()
  @level -= 1
end

#incObject

:nocov:



17
18
19
# File 'lib/thefox-ext/range/lexer/block_level.rb', line 17

def inc()
  @level += 1
end

#inspectObject

:nocov:



12
13
14
# File 'lib/thefox-ext/range/lexer/block_level.rb', line 12

def inspect()
  'BlockLevel(%d)' % [@level]
end

#levelObject



25
26
27
# File 'lib/thefox-ext/range/lexer/block_level.rb', line 25

def level()
  @level
end