Class: Ripper::Lexer::State
- Inherits:
-
Struct
- Object
- Struct
- Ripper::Lexer::State
- Defined in:
- lib/ripper/lexer.rb
Instance Attribute Summary collapse
-
#to_int ⇒ Object
(also: #to_i)
Returns the value of attribute to_int.
-
#to_s ⇒ Object
(also: #inspect)
Returns the value of attribute to_s.
Instance Method Summary collapse
- #&(i) ⇒ Object
- #==(i) ⇒ Object
- #allbits?(i) ⇒ Boolean
- #anybits?(i) ⇒ Boolean
-
#initialize(i) ⇒ State
constructor
A new instance of State.
- #nobits?(i) ⇒ Boolean
- #pretty_print(q) ⇒ Object
- #|(i) ⇒ Object
Constructor Details
Instance Attribute Details
#to_int ⇒ Object Also known as: to_i
Returns the value of attribute to_int
49 50 51 |
# File 'lib/ripper/lexer.rb', line 49 def to_int @to_int end |
#to_s ⇒ Object Also known as: inspect
Returns the value of attribute to_s
49 50 51 |
# File 'lib/ripper/lexer.rb', line 49 def to_s @to_s end |
Instance Method Details
#&(i) ⇒ Object
56 |
# File 'lib/ripper/lexer.rb', line 56 def &(i) self.class.new(to_int & i) end |
#==(i) ⇒ Object
55 |
# File 'lib/ripper/lexer.rb', line 55 def ==(i) super or to_int == i end |
#allbits?(i) ⇒ Boolean
58 |
# File 'lib/ripper/lexer.rb', line 58 def allbits?(i) to_int.allbits?(i) end |
#anybits?(i) ⇒ Boolean
59 |
# File 'lib/ripper/lexer.rb', line 59 def anybits?(i) to_int.anybits?(i) end |
#nobits?(i) ⇒ Boolean
60 |
# File 'lib/ripper/lexer.rb', line 60 def nobits?(i) to_int.nobits?(i) end |
#pretty_print(q) ⇒ Object
54 |
# File 'lib/ripper/lexer.rb', line 54 def pretty_print(q) q.text(to_s) end |
#|(i) ⇒ Object
57 |
# File 'lib/ripper/lexer.rb', line 57 def |(i) self.class.new(to_int | i) end |