Class: Ripper::Lexer::State
Do not use. This class is for internal use only.
Relationships & Source Files | |
Inherits: | Object |
Defined in: | ext/ripper/lib/ripper/lexer.rb |
Class Method Summary
- .new(i) ⇒ State constructor
Instance Attribute Summary
Instance Method Summary
Constructor Details
.new(i) ⇒ State
# File 'ext/ripper/lib/ripper/lexer.rb', line 60
def initialize(i) @to_int = i @to_s = Ripper.lex_state_name(i) freeze end
Instance Attribute Details
#inspect (readonly)
Alias for #to_s.
# File 'ext/ripper/lib/ripper/lexer.rb', line 78
alias inspect to_s
#to_i (readonly)
Alias for #to_int.
# File 'ext/ripper/lib/ripper/lexer.rb', line 77
alias to_i to_int
#to_int (readonly) Also known as: #to_i
[ GitHub ]# File 'ext/ripper/lib/ripper/lexer.rb', line 58
attr_reader :to_int, :to_s
#to_s (readonly) Also known as: #inspect
[ GitHub ]# File 'ext/ripper/lib/ripper/lexer.rb', line 58
attr_reader :to_int, :to_s
Instance Method Details
#&(i)
[ GitHub ]#==(i)
[ GitHub ]# File 'ext/ripper/lib/ripper/lexer.rb', line 80
def ==(i) super or to_int == i end
#[](index)
[ GitHub ]
#allbits?(i) ⇒ Boolean
# File 'ext/ripper/lib/ripper/lexer.rb', line 83
def allbits?(i) to_int.allbits?(i) end
#anybits?(i) ⇒ Boolean
# File 'ext/ripper/lib/ripper/lexer.rb', line 84
def anybits?(i) to_int.anybits?(i) end
#nobits?(i) ⇒ Boolean
# File 'ext/ripper/lib/ripper/lexer.rb', line 85
def nobits?(i) to_int.nobits?(i) end
#pretty_print(q)
[ GitHub ]# File 'ext/ripper/lib/ripper/lexer.rb', line 79
def pretty_print(q) q.text(to_s) end