In Files

  • ripper/lib/ripper/lexer.rb

Class/Module Index [+]

Quicksearch

Ripper::Lexer::State

Attributes

inspect[R]
to_i[R]
to_int[R]
to_s[R]

Public Class Methods

new(i) click to toggle source
 
               # File ripper/lib/ripper/lexer.rb, line 58
def initialize(i)
  @to_int = i
  @to_s = Ripper.lex_state_name(i)
  freeze
end
            

Public Instance Methods

&(i) click to toggle source
 
               # File ripper/lib/ripper/lexer.rb, line 79
def &(i) self.class.new(to_int & i) end
            
==(i) click to toggle source
 
               # File ripper/lib/ripper/lexer.rb, line 78
def ==(i) super or to_int == i end
            
[](index) click to toggle source
 
               # File ripper/lib/ripper/lexer.rb, line 64
def [](index)
  case index
  when 0, :to_int
    @to_int
  when 1, :to_s
    @event
  else
    nil
  end
end
            
allbits?(i) click to toggle source
 
               # File ripper/lib/ripper/lexer.rb, line 81
def allbits?(i) to_int.allbits?(i) end
            
anybits?(i) click to toggle source
 
               # File ripper/lib/ripper/lexer.rb, line 82
def anybits?(i) to_int.anybits?(i) end
            
nobits?(i) click to toggle source
 
               # File ripper/lib/ripper/lexer.rb, line 83
def nobits?(i) to_int.nobits?(i) end
            
pretty_print(q) click to toggle source
 
               # File ripper/lib/ripper/lexer.rb, line 77
def pretty_print(q) q.text(to_s) end
            
|(i) click to toggle source
 
               # File ripper/lib/ripper/lexer.rb, line 80
def |(i) self.class.new(to_int | i) end
            
There is an updated format of the API docs for this version here.