Class: Prism::Reflection::FlagsField
- Defined in:
- lib/prism/reflection.rb
Overview
A flags field represents a bitset of flags on a node. It resolves to an integer in Ruby. Note that the flags cannot be accessed directly on the node because the integer is kept private. Instead, the various flags in the bitset should be accessed through their query methods.
Instance Attribute Summary collapse
-
#flags ⇒ Object
readonly
The names of the flags in the bitset.
Attributes inherited from Field
Instance Method Summary collapse
-
#initialize(name, flags) ⇒ FlagsField
constructor
Initializes the flags field with the given name and flags.
Constructor Details
#initialize(name, flags) ⇒ FlagsField
Initializes the flags field with the given name and flags.
97 98 99 100 |
# File 'lib/prism/reflection.rb', line 97 def initialize(name, flags) super(name) @flags = flags end |
Instance Attribute Details
#flags ⇒ Object (readonly)
The names of the flags in the bitset.
94 95 96 |
# File 'lib/prism/reflection.rb', line 94 def flags @flags end |