123456789_123456789_123456789_123456789_123456789_

Class: Prism::Reflection::FlagsField

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Field
Instance Chain:
self, Field
Inherits: Prism::Reflection::Field
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.

Class Method Summary

Field - Inherited

.new

Initializes the field with the given name.

Instance Attribute Summary

  • #flags readonly

    The names of the flags in the bitset.

Field - Inherited

#name

The name of the field.

Constructor Details

.new(name, flags) ⇒ FlagsField

Initializes the flags field with the given name and flags.

[ GitHub ]

  
# File 'lib/prism/reflection.rb', line 100

def initialize(name, flags)
  super(name)
  @flags = flags
end

Instance Attribute Details

#flags (readonly)

The names of the flags in the bitset.

[ GitHub ]

  
# File 'lib/prism/reflection.rb', line 97

attr_reader :flags