Class: Prism::Reflection::FlagsField

Inherits:
Field
  • Object
show all
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

Attributes inherited from Field

#name

Instance Method Summary collapse

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

#flagsObject (readonly)

The names of the flags in the bitset.



94
95
96
# File 'lib/prism/reflection.rb', line 94

def flags
  @flags
end