123456789_123456789_123456789_123456789_123456789_

Class: Ripper::Lexer::State

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Struct
Instance Chain:
self, Struct
Inherits: Struct
Defined in: ext/ripper/lib/ripper/lexer.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(i) ⇒ State

[ GitHub ]

  
# File 'ext/ripper/lib/ripper/lexer.rb', line 58

def initialize(i) super(i, Ripper.lex_state_name(i)).freeze end

Instance Attribute Details

#inspect (readonly)

Alias for #to_s.

[ GitHub ]

  
# File 'ext/ripper/lib/ripper/lexer.rb', line 60

alias inspect to_s

#to_i (readonly)

Alias for #to_int.

[ GitHub ]

  
# File 'ext/ripper/lib/ripper/lexer.rb', line 57

alias to_i to_int

#to_int (rw) Also known as: #to_i

[ GitHub ]

  
# File 'ext/ripper/lib/ripper/lexer.rb', line 56

State = Struct.new(:to_int, :to_s)

#to_s (rw) Also known as: #inspect

[ GitHub ]

  
# File 'ext/ripper/lib/ripper/lexer.rb', line 56

State = Struct.new(:to_int, :to_s)

Instance Method Details

#&(i)

[ GitHub ]

  
# File 'ext/ripper/lib/ripper/lexer.rb', line 63

def &(i) self.class.new(to_int & i) end

#==(i)

[ GitHub ]

  
# File 'ext/ripper/lib/ripper/lexer.rb', line 62

def ==(i) super or to_int == i end

#allbits?(i) ⇒ Boolean

[ GitHub ]

  
# File 'ext/ripper/lib/ripper/lexer.rb', line 65

def allbits?(i) to_int.allbits?(i) end

#anybits?(i) ⇒ Boolean

[ GitHub ]

  
# File 'ext/ripper/lib/ripper/lexer.rb', line 66

def anybits?(i) to_int.anybits?(i) end

#nobits?(i) ⇒ Boolean

[ GitHub ]

  
# File 'ext/ripper/lib/ripper/lexer.rb', line 67

def nobits?(i) to_int.nobits?(i) end

#pretty_print(q)

[ GitHub ]

  
# File 'ext/ripper/lib/ripper/lexer.rb', line 61

def pretty_print(q) q.text(to_s) end

#|(i)

[ GitHub ]

  
# File 'ext/ripper/lib/ripper/lexer.rb', line 64

def |(i) self.class.new(to_int | i) end