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
56 57 58 |
# File 'lib/ripper/lexer.rb', line 56 def to_int @to_int end |
#to_s ⇒ Object Also known as: inspect
Returns the value of attribute to_s
56 57 58 |
# File 'lib/ripper/lexer.rb', line 56 def to_s @to_s end |
Instance Method Details
#&(i) ⇒ Object
63 |
# File 'lib/ripper/lexer.rb', line 63 def &(i) self.class.new(to_int & i) end |
#==(i) ⇒ Object
62 |
# File 'lib/ripper/lexer.rb', line 62 def ==(i) super or to_int == i end |
#allbits?(i) ⇒ Boolean
65 |
# File 'lib/ripper/lexer.rb', line 65 def allbits?(i) to_int.allbits?(i) end |
#anybits?(i) ⇒ Boolean
66 |
# File 'lib/ripper/lexer.rb', line 66 def anybits?(i) to_int.anybits?(i) end |
#nobits?(i) ⇒ Boolean
67 |
# File 'lib/ripper/lexer.rb', line 67 def nobits?(i) to_int.nobits?(i) end |
#pretty_print(q) ⇒ Object
61 |
# File 'lib/ripper/lexer.rb', line 61 def pretty_print(q) q.text(to_s) end |
#|(i) ⇒ Object
64 |
# File 'lib/ripper/lexer.rb', line 64 def |(i) self.class.new(to_int | i) end |