Class: TheFox::Range::Lexer::BlockLevel
- Inherits:
-
Object
- Object
- TheFox::Range::Lexer::BlockLevel
- Defined in:
- lib/thefox-ext/range/lexer/block_level.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
- #dec ⇒ Object
-
#inc ⇒ Object
:nocov:.
-
#initialize ⇒ BlockLevel
constructor
A new instance of BlockLevel.
-
#inspect ⇒ Object
:nocov:.
- #level ⇒ Object
Constructor Details
#initialize ⇒ BlockLevel
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 |
#dec ⇒ Object
21 22 23 |
# File 'lib/thefox-ext/range/lexer/block_level.rb', line 21 def dec() @level -= 1 end |
#inc ⇒ Object
:nocov:
17 18 19 |
# File 'lib/thefox-ext/range/lexer/block_level.rb', line 17 def inc() @level += 1 end |
#inspect ⇒ Object
:nocov:
12 13 14 |
# File 'lib/thefox-ext/range/lexer/block_level.rb', line 12 def inspect() 'BlockLevel(%d)' % [@level] end |
#level ⇒ Object
25 26 27 |
# File 'lib/thefox-ext/range/lexer/block_level.rb', line 25 def level() @level end |