Class: Prism::Reflection::Field

Inherits:
Object
  • Object
show all
Defined in:
lib/prism/reflection.rb

Overview

A field represents a single piece of data on a node. It is the base class for all other field types.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Field

Initializes the field with the given name.



21
22
23
# File 'lib/prism/reflection.rb', line 21

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

The name of the field.



18
19
20
# File 'lib/prism/reflection.rb', line 18

def name
  @name
end